Quellcode durchsuchen

fixed an error in the calculation of the hexagon's vertice's coordinates

Adrien Boucaud vor 12 Jahren
Ursprung
Commit
9a59819f12
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      hexagon.c

+ 2 - 2
hexagon.c

@@ -153,8 +153,8 @@ void drawPlayer()
     for(i = 0; i<6; ++i)
     {
         int angle = i *60;
-        x[i] = 8.*cos((PI*angle + cam.angle*2)/180.) + cam.cX;
-        y[i] = 8.*sin((PI*angle + cam.angle*2.)/180.) + cam.cY;
+        x[i] = 8.*cos(PI * (angle + cam.angle)/180.) + cam.cX;
+        y[i] = 8.*sin(PI * (angle + cam.angle)/180.) + cam.cY;
     }
 
 	//draw the aforementionned circle, depending on the camera's center