diff options
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qglobal.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index c45ad12e99..58c4256aa5 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -676,12 +676,12 @@ typedef void (*QFunctionPointer)(); Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(double p1, double p2) { - return (qAbs(p1 - p2) <= 0.000000000001 * qMin(qAbs(p1), qAbs(p2))); + return (qAbs(p1 - p2) * 1000000000000. <= qMin(qAbs(p1), qAbs(p2))); } Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(float p1, float p2) { - return (qAbs(p1 - p2) <= 0.00001f * qMin(qAbs(p1), qAbs(p2))); + return (qAbs(p1 - p2) * 100000.f <= qMin(qAbs(p1), qAbs(p2))); } /*! |