REVIEWED: `CheckCollisionPointRec()`

This commit is contained in:
Ray 2024-07-07 09:09:34 +02:00
parent 1039e3c1bd
commit a8240722c6
1 changed files with 2 additions and 2 deletions

View File

@ -2172,9 +2172,9 @@ bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius)
{ {
bool collision = false; 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; return collision;
} }