You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since trigonometric functions are periodic, they should output the same values for angles modulo 360.
Actual Behavior
At very large angles, trigonometric functions (as implemented in the underlying JavaScript VM) accumulate rounding error.
Here's a test case. Mash the spacebar enough and the problem will manifest. Note that these angles are still less than Number.MAX_SAFE_INTEGER. I've confirmed this on Linux Chrome + Firefox and Windows Firefox.
Expected Behavior
Since trigonometric functions are periodic, they should output the same values for angles modulo 360.
Actual Behavior
At very large angles, trigonometric functions (as implemented in the underlying JavaScript VM) accumulate rounding error.
Here's a test case. Mash the spacebar enough and the problem will manifest. Note that these angles are still less than
Number.MAX_SAFE_INTEGER. I've confirmed this on Linux Chrome + Firefox and Windows Firefox.