From afa5744150300734f8e63f6b452f3368e33dcade Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 16 Feb 2017 10:07:22 +0100 Subject: spline-widget: one magic number less --- spline-widget/spline.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'spline-widget') 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; ); -- cgit v1.2.3