diff options
-rw-r--r-- | src/ball.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -101,7 +101,7 @@ _db_ball_bounce(struct db_ball *ball, double col_x, double col_y) double col_a; col_a = atan2(col_y - ball->y, col_x - ball->x) * 180 / M_PI; - ball->a = (2 * col_a - ball->a - 180) % 360; + ball->a = fmod(2 * col_a - ball->a - 180, 360); } void |