diff options
-rw-r--r-- | src/corelib/global/qglobal.cpp | 18 | ||||
-rw-r--r-- | src/corelib/global/qglobal.h | 6 |
2 files changed, 18 insertions, 6 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index c244f7cd61..55b3fde55e 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -4247,6 +4247,24 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters) */ /*! + \fn bool qFuzzyIsNull(double d) + \relates <QtGlobal> + \since 4.4 + \threadsafe + + Returns true if the absolute value of \a d is within 0.000000000001 of 0.0. +*/ + +/*! + \fn bool qFuzzyIsNull(float f) + \relates <QtGlobal> + \since 4.4 + \threadsafe + + Returns true if the absolute value of \a f is within 0.00001f of 0.0. +*/ + +/*! \macro QT_REQUIRE_VERSION(int argc, char **argv, const char *version) \relates <QtGlobal> diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 70ed388149..971e1ef6e8 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -771,18 +771,12 @@ Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(float p1, float p2) return (qAbs(p1 - p2) * 100000.f <= qMin(qAbs(p1), qAbs(p2))); } -/*! - \internal -*/ Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(double d) Q_REQUIRED_RESULT Q_DECL_UNUSED; Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(double d) { return qAbs(d) <= 0.000000000001; } -/*! - \internal -*/ Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(float f) Q_REQUIRED_RESULT Q_DECL_UNUSED; Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(float f) { |