summaryrefslogtreecommitdiffhomepage
path: root/src/shapes.c
diff options
context:
space:
mode:
authorDavid Reid <[email protected]>2018-07-05 22:33:16 +1000
committerDavid Reid <[email protected]>2018-07-05 22:33:16 +1000
commit1d354bc7045f14ed47c153c031d68641a80fc6fe (patch)
tree9affe50bcb06515d6cbd123df37b6a30a4c7518a /src/shapes.c
parent63cf43b72947e80791c2a74d98a20e4a96c9af9e (diff)
parent7c362370488d740ec89cbdd0803b85ee8336711e (diff)
downloadraylib-1d354bc7045f14ed47c153c031d68641a80fc6fe.tar.gz
raylib-1d354bc7045f14ed47c153c031d68641a80fc6fe.zip
Merge branch 'master' of https://github.com/raysan5/raylib into dr/mini_al
Diffstat (limited to 'src/shapes.c')
-rw-r--r--src/shapes.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/shapes.c b/src/shapes.c
index dc547e0d..604dcb87 100644
--- a/src/shapes.c
+++ b/src/shapes.c
@@ -648,8 +648,8 @@ bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2)
{
bool collision = false;
- float dx = fabsf((rec1.x + rec1.width/2) - (rec2.x + rec2.width/2));
- float dy = fabsf((rec1.y + rec1.height/2) - (rec2.y + rec2.height/2));
+ float dx = fabs((rec1.x + rec1.width/2) - (rec2.x + rec2.width/2));
+ float dy = fabs((rec1.y + rec1.height/2) - (rec2.y + rec2.height/2));
if ((dx <= (rec1.width/2 + rec2.width/2)) && ((dy <= (rec1.height/2 + rec2.height/2)))) collision = true;
@@ -678,8 +678,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 = fabsf(center.x - recCenterX);
- float dy = fabsf(center.y - recCenterY);
+ float dx = fabs(center.x - recCenterX);
+ float dy = fabs(center.y - recCenterY);
if (dx > (rec.width/2.0f + radius)) { return false; }
if (dy > (rec.height/2.0f + radius)) { return false; }
@@ -700,8 +700,8 @@ Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2)
if (CheckCollisionRecs(rec1, rec2))
{
- float dxx = fabsf(rec1.x - rec2.x);
- float dyy = fabsf(rec1.y - rec2.y);
+ float dxx = fabs(rec1.x - rec2.x);
+ float dyy = fabs(rec1.y - rec2.y);
if (rec1.x <= rec2.x)
{