View Single Post
  #7 (permalink)  
Old 07-06-2009, 09:00 AM
klaus's Avatar
klaus klaus is offline
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Switzerland
Posts: 1,797
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Are you really shure ?

In the case when
incoming reading 150°
previous reading 120°
DeltaDir=150-120=30

in your example DeltaDir<180 Then
DeltaDir = DeltaDir + 360 = 390
Do you want that ?

That's not what I want, I want results between -180 to + 180

In my code the result remains 30 because Abs(DeltaDir) is less than 180

Best regards.
__________________
Klaus
Switzerland

Last edited by klaus : 07-06-2009 at 09:02 AM.
Reply With Quote