summaryrefslogtreecommitdiffstats
path: root/src/ball.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ball.c')
-rw-r--r--src/ball.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ball.c b/src/ball.c
index a7ed27e..5b9fda5 100644
--- a/src/ball.c
+++ b/src/ball.c
@@ -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