From: Brian Paul Date: Wed, 9 May 2001 17:14:19 +0000 (+0000) Subject: make sure rotation plugged into sin/cos lookup tables is always positive, fixes FP... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7b9ff48d022f43e129ad94e7ca9783a0b007a2c4;p=mesa.git make sure rotation plugged into sin/cos lookup tables is always positive, fixes FP exception --- 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; + } } }