summaryrefslogtreecommitdiffhomepage
path: root/spline/spline.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-10-20 05:36:40 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-10-20 05:36:40 +0200
commit18b559ff13898e8e96275b7e329bfa23b7394f6f (patch)
tree5d22b7453992a96142c2e6a5e91289e50a377858 /spline/spline.cpp
parentd1e7df336ce101a0fd9b05e4d3b2b8d49f6caa61 (diff)
spline: allow switch pitch mapping max Y 90/180
Diffstat (limited to 'spline/spline.cpp')
-rw-r--r--spline/spline.cpp13
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);
}