diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-02-16 10:07:22 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-02-16 10:07:22 +0100 |
commit | afa5744150300734f8e63f6b452f3368e33dcade (patch) | |
tree | 89c22c46e66a65322e5b9ec66c6206be1f9b02c2 | |
parent | 2dd09018985cb714ea5e8a9bb7a110fb68625f2c (diff) |
spline-widget: one magic number less
-rw-r--r-- | spline-widget/spline.cpp | 5 |
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; ); |