In my code:
Vector2 colCircle = new Vector2();
colCircle = new Vector2((R * Math.Sin(D)), -(R * Math.Cos(D)));
While:
R = 22.627
D = 89.214
When checked on my calculator, the X value is correct, but the Y value should be -0.310 but in program it is -7.134.
Any ideas why?
The Math. cos() function returns the cosine of a number in radians.
Cos θ = sin θ/tan θ Sec θ = tan θ/sin θ
The cosine is equal to the ratio of the side adjacent to the angle and the hypotenuse of the right-angled triangle they define. The angle must be measured in radians.
The trigonometric functions expect radians, not degrees.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With