stupid error fixed
This commit is contained in:
parent
82ea67edb7
commit
ac2574fe2a
@ -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){
|
||||
|
Loading…
Reference in New Issue
Block a user