Remove trailing spaces

This commit is contained in:
Ray
2026-03-25 16:51:02 +01:00
parent 5dd4036ed0
commit 0f0983c065
23 changed files with 184 additions and 185 deletions

View File

@ -31,7 +31,7 @@ typedef struct Ball {
Vector2 speed;
Vector2 prevPosition;
float radius;
float friction;
float friction;
float elasticity;
Color color;
bool grabbed;
@ -62,7 +62,7 @@ int main(void)
.color = BLUE,
.grabbed = false
};
int ballCount = 1;
Ball *grabbedBall = NULL; // A pointer to the current ball that is grabbed
Vector2 pressOffset = { 0 }; // Mouse press offset relative to the ball that grabbedd
@ -157,10 +157,10 @@ int main(void)
{
ball->position.x = screenWidth - ball->radius; // Ball repositioning
ball->speed.x = -ball->speed.x*ball->elasticity; // Elasticity makes the ball lose 10% of its velocity on hit
}
}
// Does the ball hit the screen left boundary?
else if ((ball->position.x - ball->radius) <= 0)
{
{
ball->position.x = ball->radius;
ball->speed.x = -ball->speed.x*ball->elasticity;
}
@ -170,9 +170,9 @@ int main(void)
{
ball->position.y = screenHeight - ball->radius;
ball->speed.y = -ball->speed.y*ball->elasticity;
}
}
else if ((ball->position.y - ball->radius) <= 0)
{
{
ball->position.y = ball->radius;
ball->speed.y = -ball->speed.y*ball->elasticity;
}