View Single Post
  #8   Spotlight this post!  
Unread 21-08-2012, 23:27
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Programming Puzzle

Quote:
Originally Posted by plnyyanks View Post
edit: here's a VI I quickly wrote up that demonstrates both of the methods Ether wrote up: Attachment 12945
Thanks Phil. For any C programmers who may be lurking, here's how to do it in C:

Code:

error -= 360*floor(0.5+error/360);
That converts any angle to the equivalent minimum absolute value, with the correct sign.


Reply With Quote