View Single Post
  #5   Spotlight this post!  
Unread 05-07-2012, 03:58 AM
Gray Adams's Avatar
Gray Adams Gray Adams is offline
Registered User
no team
 
Join Date: Dec 2011
Rookie Year: 2000
Location: none
Posts: 282
Gray Adams is a splendid one to beholdGray Adams is a splendid one to beholdGray Adams is a splendid one to beholdGray Adams is a splendid one to beholdGray Adams is a splendid one to beholdGray Adams is a splendid one to beholdGray Adams is a splendid one to behold
Re: paper: Team 341 Vision System Code

Quote:
Originally Posted by sebflippers View Post
done. This one kind of defeats the purpose of making your code simpler, though.
Code:
	public static double boundAngle0to360Degrees(double angle)
    {
        return(angle > 0.0? angle % 360.0 : 360.0*(1 + (Math.abs((int)angle)/360))+angle);
    }
Why not just...
Code:
 public static double boundAngle0to360Degrees(double angle)
    {
        return((angle+360)%360);
    }
Reply With Quote