View Single Post
  #4   Spotlight this post!  
Unread 06-02-2007, 22:25
tdlrali tdlrali is offline
Registered User
FRC #0469 (Las Guerrillas)
Team Role: Programmer
 
Join Date: Sep 2006
Rookie Year: 2006
Location: MI
Posts: 377
tdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud of
Re: Bizarre Driving Issue

Quote:
p2_x and p2_y are unsigned integers. When your subtract from them to end up with a negative value, the computer will start to have problems. Store them in signed integers before you try to subtract 122.
AFAIK, this shouldn't be a problem.
You are not actually changing the values of p2_y and p2_x, are you? If you are just using the for calculations, it shouldn't matter what type they are.

Sorry if I'm wrong, I can't test it right now. Otherwise I would just cast p2_y as an int instead of declaring a separate variable.

Last edited by tdlrali : 06-02-2007 at 22:37.