Where is Torque's Deg2Rad / Rad2Deg functionality?
by Chris Calef · in Torque 3D Professional · 01/26/2015 (11:54 am) · 5 replies
It must be in there somewhere, right? After looking around for a while I finally broke down and added M_PI_OVER_180 and M_180_OVER_PI to the math constants header, but... surely this is already in existence?
About the author
#2
Heh, my way is one math operation faster though, maybe I'll stick with it. :-p
01/27/2015 (9:13 am)
Ah, thanks Steve, now I remember...Heh, my way is one math operation faster though, maybe I'll stick with it. :-p
#3
01/28/2015 (3:02 am)
Surely compilers know how to simplify constant arithmetic...
#4
01/28/2015 (5:06 am)
Either which way you want notice a difference ;-)
#5
01/28/2015 (9:45 am)
Yeah just kidding, really I'm too lazy to recompile the whole build just to take a constant out of mConstants.h. :-)
Associate Steve Acaster
[YorkshireRifles.com]
mRadToDeg(%rad);
Engine\source\math\mConsoleFunctions.cpp(237)
Engine\source\math\mMathFn.h(417):inline F32 mRadToDeg(F32 r)