Joined: 30 Oct 2007
Location: Ottawa, Ontario, Canada
|COMPILER 5.026 trigonometric function problems?
|Posted: Fri Dec 29, 2017 10:29 am
Is it possible that there are calculation issues with the sin() and cos() functions?
Because if you calculate just on a calculator:
cos(90) = 0
sin(90) = 1
If I do it with the compiler and do a printf on the screen, I get the following:
float x = cos(90); -> returns -0.448
float y = sin(90); -> returns 0.893
Am I missing anything here?
[EDIT] I found the problem. It is in RAD. I need to convert to DEG.