Commit 5e4155a2 authored by Steve Tonneau's avatar Steve Tonneau
Browse files

[BUG FIX] dti_1 inversed twice in exact_cubic

parent 82947274
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment