From ceb45b5f65330346491c639f02238463b45115b6 Mon Sep 17 00:00:00 2001 From: Mark Mine Date: Thu, 9 May 2002 06:29:46 +0000 Subject: [PATCH] Fixed bug in computation of delta t in make_even function --- panda/src/parametrics/parametricCurveCollection.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/panda/src/parametrics/parametricCurveCollection.cxx b/panda/src/parametrics/parametricCurveCollection.cxx index 8f062563ea..e56efd1802 100644 --- a/panda/src/parametrics/parametricCurveCollection.cxx +++ b/panda/src/parametrics/parametricCurveCollection.cxx @@ -354,13 +354,13 @@ make_even(float max_t, float segments_per_unit) { float last_t = 0.0f; fitter.add_xyz(0.0f, LVecBase3f(last_t, 0.0f, 0.0f)); - float val_inc= 1.0f/(num_segments * max_t); + float val_inc= 1.0f/num_segments; float val=val_inc; for (int i = 0; i < num_segments; i++,val+=val_inc) { float next_t = xyz_curve->find_length(last_t, segment_length); - fitter.add_xyz(/*(float)(i + 1)/(num_segments * max_t),*/ - val, + fitter.add_xyz(/*(float)(i + 1)/num_segments * max_t,*/ + val * max_t, LVecBase3f(next_t, 0.0f, 0.0f)); if (parametrics_cat.is_spam()) {