View Single Post
  #16   Spotlight this post!  
Unread 01-02-2013, 14:12
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,089
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: remainder function

Quote:
Originally Posted by 1075guy View Post
OK, so do this instead:

Code:
output = (719 % 360 > 180) ? (-360 + (719 % 360)) : (719 % 360);
Fails when angle = -359. Doesn't work with floats.


Reply With Quote