From d0fa238637da996203e2ea8c94a4d81ced28b480 Mon Sep 17 00:00:00 2001 From: kai-z99 Date: Wed, 29 May 2024 20:52:29 -0700 Subject: [PATCH] comment --- src/raylib.h | 2 +- src/rshapes.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/raylib.h b/src/raylib.h index 1758e7b80..c0bb39b1c 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -1295,7 +1295,7 @@ RLAPI bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Ve RLAPI bool CheckCollisionPointPoly(Vector2 point, Vector2 *points, int pointCount); // Check if point is within a polygon described by array of vertices RLAPI bool CheckCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 *collisionPoint); // Check the collision between two lines defined by two points each, returns collision point by reference RLAPI bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshold); // Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold] -RLAPI bool CheckCollisionCircleLine(Vector2 center, float radius, Vector2 p1, Vector2 p2); +RLAPI bool CheckCollisionCircleLine(Vector2 center, float radius, Vector2 p1, Vector2 p2); // Check if circle collides with a line created betweeen two points [p1] and [p2] RLAPI Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2); // Get collision rectangle for two rectangles collision //------------------------------------------------------------------------------------ diff --git a/src/rshapes.c b/src/rshapes.c index c74d9ee2e..da03c6ee3 100644 --- a/src/rshapes.c +++ b/src/rshapes.c @@ -2315,6 +2315,7 @@ bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshol return collision; } +// Check if circle collides with a line created betweeen two points [p1] and [p2] RLAPI bool CheckCollisionCircleLine(Vector2 center, float radius, Vector2 p1, Vector2 p2) { float dx = p1.x - p2.x;