Thread: Robot Drifting
View Single Post
  #4   Spotlight this post!  
Unread 15-02-2004, 12:13
Phil_Lutz's Avatar
Phil_Lutz Phil_Lutz is offline
Phil Lutz
#0851 (Froggers)
Team Role: Mentor
 
Join Date: Jan 2004
Location: El Segundo, CA
Posts: 67
Phil_Lutz is on a distinguished road
Send a message via Yahoo to Phil_Lutz
Re: Robot Drifting

You Constant (#define) can be a floating point value.
but....
when you apply it in your program the result will be an int.
ie.

#define CONSTANT 1.5

int adjust_speed(int speed_in)
(
int speed_out;
speed_out = (speed_in/CONSTANT);
return speed_out; //sends back an int
)