- Home /
Result of Mathf.Sin
If I calculate Sin on calc I get one answer When I use Mathf.Sin for the same number in unity I get another answer. What causes the difference?
Could it be a degrees/radians thing? $$anonymous$$athf.Sin expects radians so if your "calc" expects degrees and you literally put the same numbers in you'll get totally different results. Except at zero.
Answer by Bunny83 · Dec 13, 2017 at 09:53 PM
Angles in mathematics and pretty much all computer languages are measured in radians and not in degree. Most intefaces for humans work with degrees (0 to 360 or -180 to 180). Mathematically radians actually make more sense. An angle in radians go from 0 to 2*PI (or -PI to PI).
That's all.
"An angle in radians go from 0 to 2*PI." Some additional info: This works well because, an arc (circle segment) of X radians, and r radius, has a length that is exactly equal to the simple expression: X*r. No additional terms or factors are required.
Your answer
Follow this Question
Related Questions
Using mathf.Sin() to move an object 3 Answers
How to make mesh ripples fade c# 1 Answer
Using sin and cos to decompose a vector 2 Answers
help me to rotate an object 1 Answer
Changing speed on run time in script makes attached object act weird C# 1 Answer