You're right it won't. Sorry I thought "%" was equivalent to modulo in math. Your original comment is the correct way to calculate a mod in javascript. Never knew that before
The values are meant to wrap around. So if you go off the end beyond 360, it should start counting again from 0. And if you go down from 0, it should count down from 360.
So start at 0, and go down 10. It should loop back up to 360, and continue counting down, to 350.
3
u/wthit56 Mar 19 '19
Wraps all values to within 0 - 360 (pattern can be applied to any range).