|
Overflow?
My robot's pos_x and pos_y variables seem to overflow over time but not because of incrementing...
If I don't move the robot the pos_x and pos_y stay 0 for a while then suddenly become 32767 (max int value?)
pos_x += sin(heading_radians) * dist;
pos_y += cos(heading_radians) * dist;
I'm using the float trig functions in math.h that comes with the new compiler. Is this happening because the float functions take too much time? Would Int Trig solve this?
thanks for your help!
__________________
I would change the world but I don't have the source code.
|