View Full Version : Atan function

08 August 2007, 11:11 AM
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.

08 August 2007, 02:57 PM
MAXScript returns the result in degrees, PHP in radians. You can convert the value using degToRad or radToDeg.

08 August 2007, 04:23 PM
Got the result multiplied with PI over 180 now.
Thanks ypuech. :thumbsup:

CGTalk Moderation
08 August 2007, 04: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.