소스 검색

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

Adrien Boucaud 12 년 전
부모
커밋
9a59819f12
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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