summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qsimplex_p.h
diff options
context:
space:
mode:
authorEduardo M. Fleury <eduardo.fleury@openbossa.org>2009-10-27 20:29:02 (GMT)
committerEduardo M. Fleury <eduardo.fleury@openbossa.org>2009-11-04 23:28:27 (GMT)
commit6c758ba18ded5ed1ac518777cb59e519142d292c (patch)
treebed5b0066df47f96682f1e705dded0a636faa06c /src/gui/graphicsview/qsimplex_p.h
parentd4d6901d82476e92f4c318d8d6e9da5d3410920f (diff)
downloadQt-6c758ba18ded5ed1ac518777cb59e519142d292c.zip
Qt-6c758ba18ded5ed1ac518777cb59e519142d292c.tar.gz
Qt-6c758ba18ded5ed1ac518777cb59e519142d292c.tar.bz2
QGAL: Avoid false assertions due to floating point precision errors
Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Diffstat (limited to 'src/gui/graphicsview/qsimplex_p.h')
-rw-r--r--src/gui/graphicsview/qsimplex_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qsimplex_p.h b/src/gui/graphicsview/qsimplex_p.h
index 084ad7f..a5816d1 100644
--- a/src/gui/graphicsview/qsimplex_p.h
+++ b/src/gui/graphicsview/qsimplex_p.h
@@ -107,7 +107,7 @@ struct QSimplexConstraint
Q_ASSERT(constant > 0 || qFuzzyCompare(1, 1 + constant));
- if ((leftHandSide == constant) || qFuzzyCompare(1000 + leftHandSide, 1000 + constant))
+ if ((leftHandSide == constant) || qAbs(leftHandSide - constant) < 0.00000001)
return true;
switch (ratio) {