summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--spline/spline.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/spline/spline.cpp b/spline/spline.cpp
index 277ab407..3787e0f9 100644
--- a/spline/spline.cpp
+++ b/spline/spline.cpp
@@ -405,8 +405,9 @@ void spline::recompute()
for (int j = 0; j < i; j++)
{
const QPointF& pt2(list[j]);
- const double dist_sq = QPointF::dotProduct(pt, pt2);
- const double overlap = max_x / 360.;
+ const QPointF tmp(pt - pt2);
+ const double dist_sq = QPointF::dotProduct(tmp, tmp);
+ const double overlap = max_x / 500.;
if (dist_sq < overlap * overlap)
return true;
}