Commit b27a351a authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

[bezier] fix evaluation of bezier of degree 0

parent dfaa680e
Pipeline #4118 passed with stage
in 2 minutes and 47 seconds
......@@ -142,7 +142,11 @@ struct bezier_curve : public curve_abc<Time, Numeric, Dim, Safe, Point>
{
if(Safe &! (0 <= t && t <= T_))
throw std::out_of_range("can't evaluate bezier curve, out of range"); // TODO
return evalHorner(t);
if (size_ == 1){
return mult_T_*pts_[0];
}else{
return evalHorner(t);
}
}
/// \brief Computes the derivative curve at order N.
......
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