Corrected some bugs and warnings
This commit is contained in:
parent
ceb7325727
commit
7db895ab5d
6 changed files with 15 additions and 13 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue