commit | 7b9ff48d022f43e129ad94e7ca9783a0b007a2c4 | [log] [tgz] |
---|---|---|
author | Brian Paul <brian.paul@tungstengraphics.com> | Wed May 09 17:14:19 2001 +0000 |
committer | Brian Paul <brian.paul@tungstengraphics.com> | Wed May 09 17:14:19 2001 +0000 |
tree | bc433fa7e45ea4260913b024635323386477a397 | |
parent | f2bfc66c5db02d26e32af5e46b2abb3ceb75ae34 [diff] [blame] |
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 62d7d85..570c3e1 100644 --- a/progs/samples/star.c +++ b/progs/samples/star.c
@@ -129,6 +129,9 @@ if (stars[n].rotation > MAXANGLES) { stars[n].rotation = 0.0; } + else if (stars[n].rotation < 0.0) { + stars[n].rotation += 360.0; + } } }