I was very happy to finally see some math functions and I've tested them right away, so I've noticed that the trigonometric functions which use degrees are not working properly, while the ones who use radians work fine.
for example
math.sin(60) = 0.7475778912847248 (wrong)
math.sin_r(math.toRadians(60)) = 0.8660254037844386 (correct)
Look like that math.sin, math.cos, math.tan all make a wrong conversion to radians, using a costant conversion factor of around -0.01432655 (instad of the correct one 0.0174532...)
The inverted functions work just fine, using the same example i got:
math.asin(math.sin_r(math.toRadians(60))) = 59.99999999999999 (correct)
math.asin_r(math.sin_r(math.toRadians(60))) = 1.0471975511965976 (correct)
math.toRadians(60) = 1.0471975511965976 (correct)
Can someone check if you get the same results?
[1.4.0.3] Trigonometric functions wrong degree conversion?
Moderators: dorpond, trevor, Azhrei
Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior.
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior.
Re: [1.4.0.3] Trigonometric functions wrong degree conversio
http://forums.rptools.net/viewtopic.php ... 16#p263116
Should be fixed in next build (which I will post around this weekend)
Should be fixed in next build (which I will post around this weekend)