Fixed bug in computation of delta t in make_even function

This commit is contained in:
Mark Mine 2002-05-09 06:29:46 +00:00
parent f43c59c642
commit ceb45b5f65

View File

@ -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()) {