Notifications
Clear all

[Closed] Atan function

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.

2 Replies

MAXScript returns the result in degrees, PHP in radians. You can convert the value using degToRad or radToDeg.

Got the result multiplied with PI over 180 now.
Thanks ypuech.