Corrected some bugs and warnings

This commit is contained in:
raysan5 2015-04-22 18:36:52 +02:00
parent ceb7325727
commit 7db895ab5d
6 changed files with 15 additions and 13 deletions

View file

@ -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;