Commit 4cdcfb59 authored by stevet's avatar stevet
Browse files

error if split undefined

parent 2b3bf942
......@@ -304,6 +304,8 @@ struct bezier_curve : public curve_abc<Time, Numeric, Dim, Safe, Point>
* @return
std::pair<bezier_curve_t,bezier_curve_t> split(const Numeric T){
if (T == T_)
throw std::runtime_error("can't split curve, interval range is equal to original curve");
t_point_t wps_first(size_),wps_second(size_);
const double t = T/T_;
wps_first[0] = pts_.front();
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