PDA

View Full Version : Atan function


Red2048
08-20-2007, 12:11 PM
Hello,
I'm having a problem with the result of the Atan() function. (using max8)


fRes = atan(-8.22785/-78.0422) as float
print fRes


maxscript gives 6.01836 as result,
where as I should have 0.105040 as result (I've validated this with the Atan() function in VB6,C++ and PHP).

I'm a bit confused why Atan in maxscript gives me this result.
Any ideas?

Thanks at front.

ypuech
08-20-2007, 03:57 PM
MAXScript returns the result in degrees, PHP in radians. You can convert the value using degToRad or radToDeg.

Red2048
08-20-2007, 05:23 PM
Got the result multiplied with PI over 180 now.
Thanks ypuech. :thumbsup:

CGTalk Moderation
08-20-2007, 05:23 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.