From 6343cb57bf9a4d2e308c380e224fc24a8fc866dc Mon Sep 17 00:00:00 2001 From: kai-z99 Date: Sat, 6 Jul 2024 17:13:36 -0700 Subject: [PATCH] remove function call --- src/rshapes.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rshapes.c b/src/rshapes.c index 9e7de1e2f..8f5506b9a 100644 --- a/src/rshapes.c +++ b/src/rshapes.c @@ -2172,11 +2172,14 @@ bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius) { bool collision = false; - collision = CheckCollisionCircles(point, 0, center, radius); + float distanceSquared = (point.x - center.x) * (point.x - center.x) + (point.y - center.y) * (point.y - center.y); + + collision = distanceSquared <= radius * radius; return collision; } + // Check if point is inside a triangle defined by three points (p1, p2, p3) bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3) {