Create Math ConsoleFunction, should be easy?
by Christopher Evans · in Torque Game Builder · 12/10/2011 (12:55 pm) · 2 replies
I created this C++ console function.
At the bottom of mConsoleFunctions.cc and placed it right before
I have rebuilt the executable. Yet when I try to compile my script I get a parse error when I call the function
Any ideas, what the problem is?
ConsoleFunction( mFmod, F32, 3, 3, "( float numerator, float denominator ) Use the mFmod function to Returns the floating-point remainder of numerator/denominator.n"
"@param Floating point value with the division numerator.n"
"@param Floating point value with the division denominator. n"
"@return The remainder of dividing the arguments.n"
"@sa mFmod")
{
F32 value = dAtof( argv[1] );
F32 mod = dAtof( argv[2] );
return( mFmod(value, mod) );
}At the bottom of mConsoleFunctions.cc and placed it right before
ConsoleFunctionGroupEnd( GeneralMath );
I have rebuilt the executable. Yet when I try to compile my script I get a parse error when I call the function
%angle = mFmod( %deg, 360.0f );
Any ideas, what the problem is?
Associate Chris Haigler
Jester Dance
%angle = mFmod( %deg, 360.0 );