Hello,
The int sin(int) function isn't working. If I put sin(90) it returns 0. If I put use double cos(double) with cos(90) it returns -0.043. Is there an alternative to the default functions? ThanX,
Actually, cos is a function included in math.h, and uses radians, so it would be prototyped with int.
To convert degrees to radians, just multiply degrees by pi, then divide by 180. Or, to save processing time, multiply it by a constant you make called PI180, than holds pi/180
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.