From 7b9ff48d022f43e129ad94e7ca9783a0b007a2c4 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 9 May 2001 17:14:19 +0000 Subject: [PATCH] make sure rotation plugged into sin/cos lookup tables is always positive, fixes FP exception --- progs/samples/star.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/progs/samples/star.c b/progs/samples/star.c index 62d7d854852..570c3e19f9d 100644 --- a/progs/samples/star.c +++ b/progs/samples/star.c @@ -129,6 +129,9 @@ void MoveStars(void) if (stars[n].rotation > MAXANGLES) { stars[n].rotation = 0.0; } + else if (stars[n].rotation < 0.0) { + stars[n].rotation += 360.0; + } } } -- 2.30.2