Refactor int to float missing parse (#5503)
* refactor int to float parse * Reverting as requested --------- Co-authored-by: Maicon <maicon@thinkpad02.exads.com>
This commit is contained in:
parent
70a63f7c62
commit
afe74c1c70
1 changed files with 63 additions and 63 deletions
|
|
@ -83,10 +83,10 @@ int main(void)
|
|||
bunnies[i].position.x += bunnies[i].speed.x;
|
||||
bunnies[i].position.y += bunnies[i].speed.y;
|
||||
|
||||
if (((bunnies[i].position.x + texBunny.width/2) > GetScreenWidth()) ||
|
||||
((bunnies[i].position.x + texBunny.width/2) < 0)) bunnies[i].speed.x *= -1;
|
||||
if (((bunnies[i].position.y + texBunny.height/2) > GetScreenHeight()) ||
|
||||
((bunnies[i].position.y + texBunny.height/2 - 40) < 0)) bunnies[i].speed.y *= -1;
|
||||
if (((bunnies[i].position.x + (float)texBunny.width/2) > GetScreenWidth()) ||
|
||||
((bunnies[i].position.x + (float)texBunny.width/2) < 0)) bunnies[i].speed.x *= -1;
|
||||
if (((bunnies[i].position.y + (float)texBunny.height/2) > GetScreenHeight()) ||
|
||||
((bunnies[i].position.y + (float)texBunny.height/2 - 40) < 0)) bunnies[i].speed.y *= -1;
|
||||
}
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue