Commit 172bceb4 authored by JasonChmn's avatar JasonChmn Committed by Pierre Fernbach
Browse files

[Rebase problem] Fix problems

parent 68e68954
......@@ -110,7 +110,7 @@ struct polynomial : public curve_abc<Time, Numeric, Safe, Point>
{
std::invalid_argument("Tmin should be inferior to Tmax");
}
if(coefficients_.size() != int(order_+1))
if(coefficients_.size() != int(degree_+1))
{
std::runtime_error("Spline order and coefficients do not match");
}
......@@ -167,7 +167,7 @@ struct polynomial : public curve_abc<Time, Numeric, Safe, Point>
}
time_t const dt (t-t_min_);
time_t cdt(1);
point_t currentPoint_ = point_t::Zero();
point_t currentPoint_ = point_t::Zero(dim_);
for(int i = (int)(order); i < (int)(degree_+1); ++i, cdt*=dt)
{
currentPoint_ += cdt *coefficients_.col(i) * fact(i, order);
......
......@@ -1420,6 +1420,7 @@ void piecewiseCurveConversionFromDiscretePointsTest(bool& error)
ComparePoints(p1, ppc(T_min+timestep), errMsg, error);
ComparePoints(p2, ppc(T_min+2*timestep), errMsg, error);
ComparePoints(p3, ppc(T_max), errMsg, error);
}
int main(int /*argc*/, char** /*argv[]*/)
{
......
Supports Markdown
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