View Single Post
  #6 (permalink)  
Old 07-06-2009, 6:50 PM
MattP MattP is offline
VB.NET Forum Idol
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Feb 2008
Location: USA
Posts: 877
Reputation: 499
MattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond repute
Default

Quote:
Originally Posted by subaru_sti View Post
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.
Reply With Quote