From 77aa8e6f0e87f0c411f8cc451d6a9d6bcee0b135 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 12 Feb 2017 13:20:41 +0200 Subject: [PATCH] Try to fix test on Windows. --HG-- branch : develop --- src/libs/vgeometry/vgobject.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/vgeometry/vgobject.cpp b/src/libs/vgeometry/vgobject.cpp index a2f74f33e..e964337d0 100644 --- a/src/libs/vgeometry/vgobject.cpp +++ b/src/libs/vgeometry/vgobject.cpp @@ -488,7 +488,8 @@ bool VGObject::IsPointOnLineviaPDP(const QPointF &t, const QPointF &p1, const QP { const auto p = qAbs(PerpDotProduct(p1, p2, t)); const auto e = GetEpsilon(p1, p2); - return p <= e; + // We can't use common "<=" here because of the floating-point accuraccy problem + return p < e || VFuzzyComparePossibleNulls(p, e); } //---------------------------------------------------------------------------------------------------------------------