![]() |
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/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 80 of file qnumeric.h.
#define Q_QNAN (QT_PREPEND_NAMESPACE(qQNaN)()) |
Definition at line 84 of file qnumeric.h.
|
inlineconstexpr |
Definition at line 475 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 400 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 405 of file qnumeric.h.
|
inlineconstexpr |
Definition at line 262 of file qnumeric.h.
|
inlineconstexpr |
Definition at line 292 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 98 of file qnumeric.cpp.
Q_CORE_EXPORT Q_DECL_CONST_FUNCTION int qFpClassify | ( | float | val | ) |
Definition at line 99 of file qnumeric.cpp.
|
nodiscardconstexprnoexcept |
Definition at line 578 of file qnumeric.h.
|
nodiscardconstexprnoexcept |
Definition at line 583 of file qnumeric.h.
|
nodiscardconstexprnoexcept |
Definition at line 588 of file qnumeric.h.
|
nodiscardconstexprnoexcept |
Definition at line 593 of file qnumeric.h.
Q_CORE_EXPORT Q_DECL_CONST_FUNCTION double qInf | ( | ) |
|
inline |
Definition at line 613 of file qnumeric.h.
|
inline |
Definition at line 614 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 59 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 53 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 56 of file qnumeric.h.
|
nodiscardconstexprnoexcept |
Definition at line 601 of file qnumeric.h.
|
nodiscardconstexprnoexcept |
Definition at line 606 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 420 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 467 of file qnumeric.h.
|
inlineconstexpr |
Definition at line 354 of file qnumeric.h.
Q_CORE_EXPORT Q_DECL_CONST_FUNCTION double qQNaN | ( | ) |
|
inlineconstexpr |
Definition at line 553 of file qnumeric.h.
|
inlineconstexpr |
Definition at line 558 of file qnumeric.h.
|
inlineconstexpr |
Definition at line 563 of file qnumeric.h.
|
inlineconstexpr |
Definition at line 568 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 410 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 415 of file qnumeric.h.
|
inlineconstexpr |
Definition at line 321 of file qnumeric.h.
|
inlineconstexpr |
Definition at line 335 of file qnumeric.h.