sin( ) and cos( ) take angles in radians, not degrees. Take your degree angle and multiply by (PI/180).
Note that you will find a very good value of PI in the cmath library - check what you need to access it with your compiler.
Reputation Points: 1268
Solved Threads: 228
Posting Virtuoso
Offline 1,895 posts
since Aug 2007