diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-04-03 14:40:25 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-04-03 14:40:26 +0200 |
commit | 814f713f01a459b48b12a3695fb1242b7d687662 (patch) | |
tree | 571598012909d82d15aca670cd9be22823596ad6 /src/corelib/global/qglobal.h | |
parent | 52ebf1f1914cea563b52baffc607407dbc6a7313 (diff) | |
parent | 448c3e85dddbfc5c101aceeeceb8584a3d41c913 (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Change-Id: Id96d4076610366a7cc66c8d8382ca25c33eaa71d
Diffstat (limited to 'src/corelib/global/qglobal.h')
-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 c879b87cda..c50235767a 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))); } /*! |