diff options
Diffstat (limited to 'spline/spline.cpp')
-rw-r--r-- | spline/spline.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/spline/spline.cpp b/spline/spline.cpp index 9d783df6..f28cc98d 100644 --- a/spline/spline.cpp +++ b/spline/spline.cpp @@ -427,7 +427,18 @@ void spline::ensure_valid(const QList<QPointF>& the_points) } return false; ); - if (!overlap) + + const bool over_limit = progn( + bool ret = false; + if (pt.y() - 1e-2 > max_y) + { + pt.setY(max_y); + ret = true; + } + return ret; + ); + + if (!overlap && !over_limit) ret_list.push_back(pt); } |