summaryrefslogtreecommitdiffhomepage
path: root/src/shapes.c
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2015-04-22 18:36:52 +0200
committerraysan5 <[email protected]>2015-04-22 18:36:52 +0200
commit7db895ab5d415d931e0319061d437c952a6155b2 (patch)
tree2a869121e96cc4059fe979c5421893330003a026 /src/shapes.c
parentceb73257272e34a739b6225e1f30e4e377fdab77 (diff)
downloadraylib-7db895ab5d415d931e0319061d437c952a6155b2.tar.gz
raylib-7db895ab5d415d931e0319061d437c952a6155b2.zip
Corrected some bugs and warnings
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 d88845cc..6e6c9dd7 100644
--- a/src/shapes.c
+++ b/src/shapes.c
@@ -395,8 +395,8 @@ bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec)
{
bool collision = false;
- float dx = abs((rec.x + rec.width/2) - center.x);
- float dy = abs((rec.y + rec.height/2) - center.y);
+ float dx = fabs((rec.x + rec.width/2) - center.x);
+ float dy = fabs((rec.y + rec.height/2) - center.y);
if ((dx <= (rec.width/2 + radius)) && (dy <= (rec.height/2 + radius))) collision = true;