소스 검색

REVIEWED: `CheckCollisionPointPoly()`

Ray 3 년 전
부모
커밋
853c66baed
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/rshapes.c

+ 1 - 1
src/rshapes.c

@@ -1555,7 +1555,7 @@ bool CheckCollisionPointPoly(Vector2 point, Vector2 *points, int pointCount)
     
     if (pointCount > 2)
     {
-        for (int i = 0; i < pointCount; i++)
+        for (int i = 0; i < pointCount - 1; i++)
         {
             Vector2 vc = points[i];
             Vector2 vn = points[i + 1];