Game Development Community

Using Math Functions in Torque

by Brian Wilmeth · in Torque Game Engine · 02/11/2006 (8:36 am) · 1 replies

I want to use functions like square root and sine cosine, perhaps even factorial. How can I do this with torque?

#1
02/11/2006 (9:21 am)
Most of the standard math functions are included and prefixed with an m
ex:
mAbs( %num );
mCos( %angle );
mSqrt( %num );

Check engine/math/mConsoleFunctions.cc for all the ones that are available