Explorar o código

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

Adrien Boucaud %!s(int64=12) %!d(string=hai) anos
pai
achega
9a59819f12
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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