From 5e4155a261b443c5271068265ffb104f43ebd226 Mon Sep 17 00:00:00 2001 From: Steve Tonneau <stonneau@axle.laas.fr> Date: Sun, 18 Sep 2016 18:43:03 +0200 Subject: [PATCH] [BUG FIX] dti_1 inversed twice in exact_cubic --- include/spline/exact_cubic.h | 2 +- include/spline/optimization/OptimizeSpline.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/spline/exact_cubic.h b/include/spline/exact_cubic.h index 6958f04..9cba9d4 100644 --- a/include/spline/exact_cubic.h +++ b/include/spline/exact_cubic.h @@ -97,7 +97,7 @@ struct exact_cubic : public curve_abc<Time, Numeric, Dim, Safe, Point> if( i+2 < size) { In it2(next); ++ it2; - num_t const dTi_1(1/((*it2).first - (*next).first)); + num_t const dTi_1((*it2).first - (*next).first); num_t const dTi_1sqr(dTi_1 * dTi_1); // this can be optimized but let's focus on clarity as long as not needed h1(i+1, i) = 2 / dTi; diff --git a/include/spline/optimization/OptimizeSpline.h b/include/spline/optimization/OptimizeSpline.h index 0f3aef4..15f05ab 100644 --- a/include/spline/optimization/OptimizeSpline.h +++ b/include/spline/optimization/OptimizeSpline.h @@ -103,7 +103,7 @@ inline void SplineOptimizer<Time, Numeric, Dim, Safe, Point>::ComputeHMatrices(I if( i+2 < size) { In it2(next); ++ it2; - num_t const dTi_1(1/((*it2).first - (*next).first)); + num_t const dTi_1((*it2).first - (*next).first); num_t const dTi_1sqr(dTi_1 * dTi_1); // this can be optimized but let's focus on clarity as long as not needed h1(i+1, i) = 2 / dTi; -- GitLab