summaryrefslogtreecommitdiffhomepage
path: root/src/raylib.h
diff options
context:
space:
mode:
authorkai-z99 <[email protected]>2024-05-29 23:24:44 -0700
committerGitHub <[email protected]>2024-05-30 08:24:44 +0200
commit606cc1d897db0a2df201b1c5f7e98bda29d74c64 (patch)
treeee236c075fb1adfe8130595aabb28ab79aa2004b /src/raylib.h
parentd7a8af144d066e28e821916ac10e66407e7bfa05 (diff)
downloadraylib-606cc1d897db0a2df201b1c5f7e98bda29d74c64.tar.gz
raylib-606cc1d897db0a2df201b1c5f7e98bda29d74c64.zip
[rshapes]Circle line collision function (#4018)
* inital function * working 1 * optimize * optimized dot product * simplify * cleanup * cleanup * cleanup * comment * var name change * epsilon
Diffstat (limited to 'src/raylib.h')
-rw-r--r--src/raylib.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/raylib.h b/src/raylib.h
index 1bf740b9..dfa98efb 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -1295,6 +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); // 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
//------------------------------------------------------------------------------------