diff options
| author | Ray <[email protected]> | 2024-07-07 09:09:34 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2024-07-07 09:09:34 +0200 |
| commit | a8240722c61d216d96c3f2cab27426ee7b7a3919 (patch) | |
| tree | 7d1e398ee0acf08a0cd6d85b59f0a179a6cc53bf | |
| parent | 1039e3c1bd61ce8694c6c191d6b34eb4807e5aae (diff) | |
| download | raylib-a8240722c61d216d96c3f2cab27426ee7b7a3919.tar.gz raylib-a8240722c61d216d96c3f2cab27426ee7b7a3919.zip | |
REVIEWED: `CheckCollisionPointRec()`
| -rw-r--r-- | src/rshapes.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rshapes.c b/src/rshapes.c index 5d5ff02c..89339708 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; } |
