diff options
| author | David Reid <[email protected]> | 2018-07-01 20:52:50 +1000 |
|---|---|---|
| committer | David Reid <[email protected]> | 2018-07-01 20:52:50 +1000 |
| commit | fec0a4f2e37e63cdbc531f6914a55442d520a104 (patch) | |
| tree | 546a30f60fbe76abb24a2514ba824ec210674c36 /src/shapes.c | |
| parent | bce7a7b5765defcfb5692dc73e7251c8dd3e9fe2 (diff) | |
| parent | 7dedb84fd07f81cbe3f7c299b7e6e3f4e9959391 (diff) | |
| download | raylib-fec0a4f2e37e63cdbc531f6914a55442d520a104.tar.gz raylib-fec0a4f2e37e63cdbc531f6914a55442d520a104.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.c | 12 |
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) { |
