View Single Post
  #8   Spotlight this post!  
Unread 26-02-2007, 01:21
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 803
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: Trouble with Autonomous

Quote:
Originally Posted by TimCraig View Post
time = (int) (1000L * degrees / 300);
It might be better to simplify that further using some algebra to something like
Code:
time = (int)((long)10 * (long)degrees / (long)3)
That way, you won't run into interger or long overflow problems until degrees is 100 times as large as it would have had to be earlier.