diff options
-rw-r--r-- | src/ball.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -87,7 +87,7 @@ db_balls_move(struct db_ball *ball) ball->x += cos(ball->a * (M_PI / 180)); ball->y += sin(ball->a * (M_PI / 180)); } else { - ball->a += ball->d * ball->s; + ball->a = fmod(ball->a + ball->d * ball->s, 360); ball->x = ball->cx + cos(ball->a * (M_PI / 180)) * ball->sr; ball->y = ball->cy + sin(ball->a * (M_PI / 180)) * ball->sr; db_dbg("Spinning ball angle %f (speed %f, direction %d)", |