![]() |
atan Problem - Need Help
Hi Guys,
I have a little problem getting the atan function of Team 296's Math Library to work for me. What I need is calculating the Degree my Joystick is looking it by using atan(x,y). I already know how to use the sin/cos function and how to work with the binary radians (-8,388,608 to 8,388,607) that the functions operate in. But for some reason the results I get back from atan seem to be different from the one sin/cos give me or in different words: Say behave nonlinear in cases they should: Here is what I tried (after I had problems with weird results): Code:
short long brad; int int_brad;Code:
atan(1,1) = 8511 (should be 32768/4=8192 = 45 Degree)Thanks for your Help, Felix |
| All times are GMT -5. The time now is 04:38. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi