![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <QtCore/qassert.h>#include <QtCore/qminmax.h>#include <QtCore/qtconfigmacros.h>#include <QtCore/qtcoreexports.h>#include <QtCore/qtypes.h>#include <cmath>#include <limits>#include <QtCore/q20type_traits.h>Go to the source code of this file.
Namespaces | |
| namespace | QtPrivate |
| namespace | QtPrivate::QRoundImpl |
Macros | |
| #define | Q_INFINITY (QT_PREPEND_NAMESPACE(qInf)()) |
| #define | Q_QNAN (QT_PREPEND_NAMESPACE(qQNaN)()) |
Functions | |
| template<typename T> | |
| QT_BEGIN_NAMESPACE constexpr std::enable_if< std::is_integral< T >::value, bool >::type | qIsInf (T) |
| template<typename T> | |
| constexpr std::enable_if< std::is_integral< T >::value, bool >::type | qIsNaN (T) |
| template<typename T> | |
| constexpr std::enable_if< std::is_integral< T >::value, bool >::type | qIsFinite (T) |
| Q_CORE_EXPORT Q_DECL_CONST_FUNCTION bool | qIsInf (double d) |
| Q_CORE_EXPORT Q_DECL_CONST_FUNCTION bool | qIsNaN (double d) |
| Q_CORE_EXPORT Q_DECL_CONST_FUNCTION bool | qIsFinite (double d) |
| Q_CORE_EXPORT Q_DECL_CONST_FUNCTION int | qFpClassify (double val) |
| Q_CORE_EXPORT Q_DECL_CONST_FUNCTION bool | qIsInf (float f) |
| Q_CORE_EXPORT Q_DECL_CONST_FUNCTION bool | qIsNaN (float f) |
| Q_CORE_EXPORT Q_DECL_CONST_FUNCTION bool | qIsFinite (float f) |
| Q_CORE_EXPORT Q_DECL_CONST_FUNCTION int | qFpClassify (float val) |
| Q_CORE_EXPORT Q_DECL_CONST_FUNCTION double | qQNaN () |
| Q_CORE_EXPORT Q_DECL_CONST_FUNCTION double | qInf () |
| Q_CORE_EXPORT quint32 | qFloatDistance (float a, float b) |
| Q_CORE_EXPORT quint64 | qFloatDistance (double a, double b) |
| template<typename T> | |
| constexpr std::enable_if_t< std::is_unsigned_v< T >, bool > | QtPrivate::qAddOverflowGeneric (T v1, T v2, T *r) |
| template<typename T> | |
| constexpr std::enable_if_t< std::is_same_v< T, decltype(+T{})>, bool > | QtPrivate::qMulOverflowWideMultiplication (T v1, T v2, T *r) |
| template<typename T> | |
| constexpr std::enable_if_t<(std::is_unsigned_v< T >||std::is_signed_v< T >), bool > | QtPrivate::qMulOverflowGeneric (T v1, T v2, T *r) |
| template<typename T> | |
| constexpr std::enable_if_t< std::is_unsigned_v< T >, bool > | qAddOverflow (T v1, T v2, T *r) |
| template<typename T> | |
| constexpr std::enable_if_t< std::is_signed_v< T >, bool > | qAddOverflow (T v1, T v2, T *r) |
| template<typename T> | |
| constexpr std::enable_if_t< std::is_unsigned_v< T >, bool > | qSubOverflow (T v1, T v2, T *r) |
| template<typename T> | |
| constexpr std::enable_if_t< std::is_signed_v< T >, bool > | qSubOverflow (T v1, T v2, T *r) |
| template<typename T> | |
| constexpr std::enable_if_t< std::is_unsigned_v< T >||std::is_signed_v< T >, bool > | qMulOverflow (T v1, T v2, T *r) |
| template<typename T, T V2> | |
| constexpr bool | qAddOverflow (T v1, std::integral_constant< T, V2 >, T *r) |
| template<auto V2, typename T> | |
| constexpr bool | qAddOverflow (T v1, T *r) |
| template<typename T, T V2> | |
| constexpr bool | qSubOverflow (T v1, std::integral_constant< T, V2 >, T *r) |
| template<auto V2, typename T> | |
| constexpr bool | qSubOverflow (T v1, T *r) |
| template<typename T, T V2> | |
| constexpr bool | qMulOverflow (T v1, std::integral_constant< T, V2 >, T *r) |
| template<auto V2, typename T> | |
| constexpr bool | qMulOverflow (T v1, T *r) |
| template<typename T> | |
| constexpr T | qAbs (const T &t) |
| template<typename T, typename std::enable_if_t< std::is_integral_v< T >, bool > = true> | |
| constexpr auto | QtPrivate::qUnsignedAbs (T t) |
| template<typename Result, typename FP, typename std::enable_if_t< std::is_integral_v< Result >, bool > = true, typename std::enable_if_t< std::is_floating_point_v< FP >, bool > = true> | |
| constexpr Result | QtPrivate::qCheckedFPConversionToInteger (FP value) |
| constexpr double | QtPrivate::QRoundImpl::qRound (double d) |
| constexpr float | QtPrivate::QRoundImpl::qRound (float d) |
| template<typename FP, typename std::enable_if_t< std::is_floating_point_v< FP >, bool > = true> | |
| constexpr int | QtPrivate::qSaturateRound (FP value) |
| constexpr int | qRound (double d) |
| constexpr int | qRound (float f) |
| constexpr qint64 | qRound64 (double d) |
| constexpr qint64 | qRound64 (float f) |
| template<typename T> | |
| constexpr const T & | QtPrivate::min (const T &a, const T &b) |
| constexpr bool | qFuzzyCompare (double p1, double p2) noexcept |
| constexpr bool | qFuzzyCompare (float p1, float p2) noexcept |
| constexpr bool | qFuzzyIsNull (double d) noexcept |
| constexpr bool | qFuzzyIsNull (float f) noexcept |
| QT_WARNING_PUSH QT_WARNING_DISABLE_FLOAT_COMPARE constexpr bool | qIsNull (double d) noexcept |
| constexpr bool | qIsNull (float f) noexcept |
| QT_WARNING_POP int | qIntCast (double f) |
| int | qIntCast (float f) |
Variables | |
| template<typename T, typename Enable = void> | |
| constexpr bool | QtPrivate::HasLargerInt = false |
| template<typename T> | |
| constexpr bool | QtPrivate::HasLargerInt< T, std::void_t< typename QIntegerForSize< sizeof(T) *2 >::Unsigned > > = true |
| #define Q_INFINITY (QT_PREPEND_NAMESPACE(qInf)()) |
Definition at line 96 of file qnumeric.h.
| #define Q_QNAN (QT_PREPEND_NAMESPACE(qQNaN)()) |
Definition at line 100 of file qnumeric.h.
|
inlineconstexpr |
Definition at line 508 of file qnumeric.h.
|
constexpr |
Equivalent to qAddOverflow(v1, v2, r) with v1 as first argument, the compile time constant V2 as second argument, and r as third argument.
Definition at line 431 of file qnumeric.h.
|
constexpr |
Equivalent to qAddOverflow(v1, v2, r) with v1 as first argument, the compile time constant V2 as second argument, and r as third argument.
Definition at line 436 of file qnumeric.h.
|
inlineconstexpr |
Definition at line 278 of file qnumeric.h.
|
inlineconstexpr |
Definition at line 311 of file qnumeric.h.
| Q_CORE_EXPORT quint64 qFloatDistance | ( | double | a, |
| double | b ) |
| Q_CORE_EXPORT quint32 qFloatDistance | ( | float | a, |
| float | b ) |
| Q_CORE_EXPORT Q_DECL_CONST_FUNCTION int qFpClassify | ( | double | val | ) |
Definition at line 101 of file qnumeric.cpp.
| Q_CORE_EXPORT Q_DECL_CONST_FUNCTION int qFpClassify | ( | float | val | ) |
Definition at line 102 of file qnumeric.cpp.
|
nodiscardconstexprnoexcept |
Definition at line 619 of file qnumeric.h.
|
nodiscardconstexprnoexcept |
Definition at line 624 of file qnumeric.h.
|
nodiscardconstexprnoexcept |
Definition at line 629 of file qnumeric.h.
|
nodiscardconstexprnoexcept |
Definition at line 634 of file qnumeric.h.
| Q_CORE_EXPORT Q_DECL_CONST_FUNCTION double qInf | ( | ) |
|
inline |
Definition at line 654 of file qnumeric.h.
|
inline |
Definition at line 655 of file qnumeric.h.
| Q_CORE_EXPORT Q_DECL_CONST_FUNCTION bool qIsFinite | ( | double | d | ) |
| Q_CORE_EXPORT Q_DECL_CONST_FUNCTION bool qIsFinite | ( | float | f | ) |
|
constexpr |
Definition at line 75 of file qnumeric.h.
| Q_CORE_EXPORT Q_DECL_CONST_FUNCTION bool qIsInf | ( | double | d | ) |
| Q_CORE_EXPORT Q_DECL_CONST_FUNCTION bool qIsInf | ( | float | f | ) |
|
constexpr |
Definition at line 69 of file qnumeric.h.
| Q_CORE_EXPORT Q_DECL_CONST_FUNCTION bool qIsNaN | ( | double | d | ) |
| Q_CORE_EXPORT Q_DECL_CONST_FUNCTION bool qIsNaN | ( | float | f | ) |
|
constexpr |
Definition at line 72 of file qnumeric.h.
|
nodiscardconstexprnoexcept |
Definition at line 642 of file qnumeric.h.
|
nodiscardconstexprnoexcept |
Definition at line 647 of file qnumeric.h.
|
constexpr |
Equivalent to qMulOverflow(v1, v2, r) with v1 as first argument, the compile time constant V2 as second argument, and r as third argument. This can be faster than calling the version with only variable arguments.
Definition at line 451 of file qnumeric.h.
|
constexpr |
Equivalent to qMulOverflow(v1, v2, r) with v1 as first argument, the compile time constant V2 as second argument, and r as third argument. This can be faster than calling the version with only variable arguments.
Definition at line 500 of file qnumeric.h.
|
inlineconstexpr |
Definition at line 382 of file qnumeric.h.
| Q_CORE_EXPORT Q_DECL_CONST_FUNCTION double qQNaN | ( | ) |
|
inlineconstexpr |
Definition at line 594 of file qnumeric.h.
|
inlineconstexpr |
Definition at line 599 of file qnumeric.h.
|
inlineconstexpr |
Definition at line 604 of file qnumeric.h.
|
inlineconstexpr |
Definition at line 609 of file qnumeric.h.
|
constexpr |
Equivalent to qSubOverflow(v1, v2, r) with v1 as first argument, the compile time constant V2 as second argument, and r as third argument.
Definition at line 441 of file qnumeric.h.
|
constexpr |
Equivalent to qSubOverflow(v1, v2, r) with v1 as first argument, the compile time constant V2 as second argument, and r as third argument.
Definition at line 446 of file qnumeric.h.
|
inlineconstexpr |
Definition at line 343 of file qnumeric.h.
|
inlineconstexpr |
Definition at line 360 of file qnumeric.h.