summaryrefslogtreecommitdiffhomepage
path: root/spline-widget/spline.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-02-16 10:07:22 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-02-16 10:07:22 +0100
commitafa5744150300734f8e63f6b452f3368e33dcade (patch)
tree89c22c46e66a65322e5b9ec66c6206be1f9b02c2 /spline-widget/spline.cpp
parent2dd09018985cb714ea5e8a9bb7a110fb68625f2c (diff)
spline-widget: one magic number less
Diffstat (limited to 'spline-widget/spline.cpp')
-rw-r--r--spline-widget/spline.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/spline-widget/spline.cpp b/spline-widget/spline.cpp
index 65e5d4af..8d7159ee 100644
--- a/spline-widget/spline.cpp
+++ b/spline-widget/spline.cpp
@@ -409,10 +409,9 @@ void spline::recompute()
{
QPointF& pt2(list[j]);
const double dist_sq = (pt.x() - pt2.x())*(pt.x() - pt2.x());
- if (dist_sq < .35)
- {
+ static constexpr double overlap = .6;
+ if (dist_sq < overlap * overlap)
return true;
- }
}
return false;
);