|
Re: Strange products upon running code...
Quote:
|
Originally Posted by neilsonster
...
Here is the actual line of code that has caused me the trouble:
unsigned int WheelCirc = (2000 * WHEEL_RAD * PI) / 1000000;
...
|
Andrew,
Try:
unsigned int WheelCirc = ((long) WHEEL_RAD * 710) / 113;
Note that the above will still fail if WHEEL_RAD gets too large...
Mike
__________________
Mike Betts
Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013
As easy as 355/113...
|