Quote:
Originally Posted by subaru_sti
Sweet, thanks. I ran a bunch of different tests and it seems to be accurate. The only thing I don't understand is "degrees = degrees Mod 360". Why do you need that? Degrees (which I should rename to Course) should only ever be between 0 and 360, right?
Stephen
|
Technically you're correct but I've learned never to trust input. If will still give you a correct value of 0 if someone enters 360.
The Mod 32 on the compassPoint is to give you a value of 0 in the case you would be passing in 0.