mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-17 00:38:14 +00:00
Some code tweaks
This commit is contained in:
@@ -397,8 +397,8 @@ bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec)
|
||||
int recCenterX = rec.x + rec.width/2;
|
||||
int recCenterY = rec.y + rec.height/2;
|
||||
|
||||
float dx = abs(center.x - recCenterX);
|
||||
float dy = abs(center.y - recCenterY);
|
||||
float dx = fabs(center.x - recCenterX);
|
||||
float dy = fabs(center.y - recCenterY);
|
||||
|
||||
if (dx > (rec.width/2 + radius)) { return false; }
|
||||
if (dy > (rec.height/2 + radius)) { return false; }
|
||||
|
Reference in New Issue
Block a user