stupid error fixed

This commit is contained in:
Johannes Reinhardt 2008-07-12 11:09:51 +02:00
parent 82ea67edb7
commit ac2574fe2a

View File

@ -26,7 +26,7 @@ path *path_new(map* m,vehicle *v){
/* Calculate a trivial path to the origin*/
/* Turn towards origin, take shorter direction*/
angle = atan2(v->y,v->x)*180/M_PI;
angle = atan2(-v->y,-v->x)*180/M_PI;
stop = abs(angle - v->dir)/m->max_turn*1000;
printf("Angle: %f stop: %f\n",angle,stop);
if(angle - v->dir > 0){