Procházet zdrojové kódy

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

Adrien Boucaud před 12 roky
rodič
revize
9a59819f12
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  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