diff options
| author | raysan5 <raysan5@gmail.com> | 2016-01-23 13:22:13 +0100 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2016-01-23 13:22:13 +0100 |
| commit | 08da91047e8a2c593c3bc40b31c4796ae6cbb26d (patch) | |
| tree | 5b18e088ad489e5232774b5f688815720a0bada4 /src/shapes.c | |
| parent | 6e9d3eb0f99c8ce00b769dbd03cc011216b97068 (diff) | |
| download | raylib-08da91047e8a2c593c3bc40b31c4796ae6cbb26d.tar.gz raylib-08da91047e8a2c593c3bc40b31c4796ae6cbb26d.zip | |
Some code tweaks
Diffstat (limited to 'src/shapes.c')
| -rw-r--r-- | src/shapes.c | 4 |
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; } |
