From a8240722c61d216d96c3f2cab27426ee7b7a3919 Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 7 Jul 2024 09:09:34 +0200 Subject: [PATCH] REVIEWED: `CheckCollisionPointRec()` --- src/rshapes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rshapes.c b/src/rshapes.c index 5d5ff02ca969..89339708a319 100644 --- a/src/rshapes.c +++ b/src/rshapes.c @@ -2172,9 +2172,9 @@ bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius) { bool collision = false; - float distanceSquared = (point.x - center.x) * (point.x - center.x) + (point.y - center.y) * (point.y - center.y); + float distanceSquared = (point.x - center.x)*(point.x - center.x) + (point.y - center.y)*(point.y - center.y); - collision = distanceSquared <= radius * radius; + if (distanceSquared <= radius*radius) collision = true; return collision; }