aboutsummaryrefslogtreecommitdiff
path: root/src/shapes.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shapes.c')
-rw-r--r--src/shapes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shapes.c b/src/shapes.c
index a4761536..3b4be071 100644
--- a/src/shapes.c
+++ b/src/shapes.c
@@ -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; }