summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <idr@freedesktop.org>2010-03-02 21:28:44 -0800
committerIan Romanick <idr@freedesktop.org>2010-03-02 21:28:44 -0800
commitc166d369ab449e523ddcb514560e093232c04506 (patch)
tree6eadbd1c25081cbc0aa3e3776b08997b377b1824
parenta312e9821f84bc3c7ad926fc78394336ef80e02b (diff)
GLUshape: Fix off-by-one error in an increment calculation in revolve
-rw-r--r--src/revolve.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/revolve.c b/src/revolve.c
index ff41029..90d48b3 100644
--- a/src/revolve.c
+++ b/src/revolve.c
@@ -30,7 +30,7 @@ revolve(const GLUvec4 *points, const GLUvec4 *normals, const float *u,
unsigned steps, float start_angle, float end_angle,
revolve_cb *cb, void *data)
{
- const float angle_step = (end_angle - start_angle) / (float) steps;
+ const float angle_step = (end_angle - start_angle) / (float) (steps - 1);
const GLUvec4 tangent = {{ 0.0, 0.0, 1.0, 0.0 }};
unsigned i;
unsigned j;