Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qnumeric_p.h File Reference

(7d4d6e88bc01affa9774cc304123ca0369c77800)

#include "QtCore/private/qglobal_p.h"
#include "QtCore/qnumeric.h"
#include "QtCore/qsimd.h"
#include <cmath>
#include <limits>
#include <type_traits>
+ Include dependency graph for qnumeric_p.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  qnumeric_std_wrapper
 

Macros

#define __has_extension(X)   0
 

Functions

static Q_DECL_CONST_FUNCTION bool qnumeric_std_wrapper::isnan (double d)
 
static Q_DECL_CONST_FUNCTION bool qnumeric_std_wrapper::isinf (double d)
 
static Q_DECL_CONST_FUNCTION bool qnumeric_std_wrapper::isfinite (double d)
 
static Q_DECL_CONST_FUNCTION int qnumeric_std_wrapper::fpclassify (double d)
 
static Q_DECL_CONST_FUNCTION bool qnumeric_std_wrapper::isnan (float f)
 
static Q_DECL_CONST_FUNCTION bool qnumeric_std_wrapper::isinf (float f)
 
static Q_DECL_CONST_FUNCTION bool qnumeric_std_wrapper::isfinite (float f)
 
static Q_DECL_CONST_FUNCTION int qnumeric_std_wrapper::fpclassify (float f)
 
constexpr static Q_DECL_CONST_FUNCTION double qt_inf () noexcept
 
constexpr static Q_DECL_CONST_FUNCTION double qt_qnan () noexcept
 
static Q_DECL_CONST_FUNCTION bool qt_is_inf (double d)
 
static Q_DECL_CONST_FUNCTION bool qt_is_nan (double d)
 
static Q_DECL_CONST_FUNCTION bool qt_is_finite (double d)
 
static Q_DECL_CONST_FUNCTION int qt_fpclassify (double d)
 
static Q_DECL_CONST_FUNCTION bool qt_is_inf (float f)
 
static Q_DECL_CONST_FUNCTION bool qt_is_nan (float f)
 
static Q_DECL_CONST_FUNCTION bool qt_is_finite (float f)
 
static Q_DECL_CONST_FUNCTION int qt_fpclassify (float f)
 
template<typename To , typename From >
static constexpr auto qt_saturate (From x)
 

Macro Definition Documentation

◆ __has_extension

#define __has_extension ( X)    0

Definition at line 27 of file qnumeric_p.h.

Function Documentation

◆ qt_fpclassify() [1/2]

static Q_DECL_CONST_FUNCTION int qt_fpclassify ( double d)
inlinestatic

Definition at line 122 of file qnumeric_p.h.

References d, and qnumeric_std_wrapper::fpclassify().

Referenced by qFpClassify(), and qFpClassify().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qt_fpclassify() [2/2]

static Q_DECL_CONST_FUNCTION int qt_fpclassify ( float f)
inlinestatic

Definition at line 142 of file qnumeric_p.h.

References qnumeric_std_wrapper::fpclassify().

+ Here is the call graph for this function:

◆ qt_inf()

constexpr static Q_DECL_CONST_FUNCTION double qt_inf ( )
inlinestaticconstexprnoexcept

Definition at line 83 of file qnumeric_p.h.

Referenced by QTextStreamPrivate::getReal(), QV4::MathObject::method_exp(), QV4::MathObject::method_expm1(), QV4::MathObject::method_max(), QV4::MathObject::method_min(), and qt_asciiToDouble().

+ Here is the caller graph for this function:

◆ qt_is_finite() [1/2]

static Q_DECL_CONST_FUNCTION bool qt_is_finite ( double d)
inlinestatic

Definition at line 117 of file qnumeric_p.h.

References d, and qnumeric_std_wrapper::isfinite().

Referenced by QQuickContext2D::arc(), QQuickContext2D::arcTo(), QString::arg(), QQuickContext2D::clearRect(), QSGBatchRenderer::Element::computeBounds(), QLocaleData::doubleToString(), QQuickContext2D::drawText(), dtoString(), QQuickContext2D::ellipse(), QQuickContext2D::fillRect(), fpToJson(), QJsonValue::fromVariant(), QQuickContext2DStyle::gradient_proto_addColorStop(), QLineF::intersects(), QQuickContext2D::isPointInPath(), QQuickJSContext2DPrototype::method_arc(), QQuickJSContext2DPrototype::method_arcTo(), QV4::MathObject::method_atan2(), QQuickJSContext2DPrototype::method_bezierCurveTo(), QQuickJSContext2DPrototype::method_createConicalGradient(), QQuickJSContext2DPrototype::method_createImageData(), QQuickJSContext2DPrototype::method_createLinearGradient(), QQuickJSContext2DPrototype::method_createRadialGradient(), QQuickJSContext2DPrototype::method_drawImage(), QQuickJSContext2DPrototype::method_fillText(), QQuickJSContext2DPrototype::method_getImageData(), QQuickJSContext2DPrototype::method_lineTo(), QQuickJSContext2DPrototype::method_moveTo(), QQuickJSContext2DPrototype::method_putImageData(), QQuickJSContext2DPrototype::method_quadraticCurveTo(), QQuickJSContext2D::method_set_globalAlpha(), QQuickJSContext2D::method_set_lineDashOffset(), QQuickJSContext2D::method_set_lineWidth(), QQuickJSContext2D::method_set_miterLimit(), QQuickJSContext2D::method_set_shadowBlur(), QQuickJSContext2D::method_set_shadowOffsetX(), QQuickJSContext2D::method_set_shadowOffsetY(), QQuickJSContext2DPrototype::method_setLineDash(), QQuickJSContext2DPrototype::method_text(), qt_asciiToDouble(), QQuickContext2D::rect(), QQuickContext2D::rotate(), QQuickContext2D::roundedRect(), QQuickContext2D::scale(), QQuickAbstractColorPicker::setAlpha(), QQuickColorDialogImpl::setAlpha(), QQuickTableView::setColumnSpacing(), QQuickAbstractColorPicker::setHue(), QQuickColorDialogImpl::setHue(), QQuickAbstractColorPicker::setLightness(), QQuickColorDialogImpl::setLightness(), QQuickScrollBar::setMinimumSize(), QQuickScrollBarPrivate::setPosition(), QQuickTableView::setRowSpacing(), QQuickAbstractColorPicker::setSaturation(), QQuickColorDialogImpl::setSaturation(), QQuickScrollBar::setSize(), QQuickScrollBar::setStepSize(), QQuickContext2D::setTransform(), QQuickAbstractColorPicker::setValue(), QQuickColorDialogImpl::setValue(), QQuickContext2D::shear(), QQuickContext2D::strokeRect(), TimeClip(), QQuickContext2D::transform(), QQuickContext2D::translate(), QQuickImage::updatePaintNode(), and valueToJson().

+ Here is the call graph for this function:

◆ qt_is_finite() [2/2]

static Q_DECL_CONST_FUNCTION bool qt_is_finite ( float f)
inlinestatic

Definition at line 137 of file qnumeric_p.h.

References qnumeric_std_wrapper::isfinite().

+ Here is the call graph for this function:

◆ qt_is_inf() [1/2]

static Q_DECL_CONST_FUNCTION bool qt_is_inf ( double d)
inlinestatic

Definition at line 107 of file qnumeric_p.h.

References d, and qnumeric_std_wrapper::isinf().

Referenced by makeFpString(), QV4::MathObject::method_atan2(), QV4::MathObject::method_exp(), QV4::MathObject::method_expm1(), QV4::MathObject::method_fround(), QV4::NumberPrototype::method_isFinite(), QV4::NumberPrototype::method_isInteger(), QV4::NumberPrototype::method_isSafeInteger(), QV4::NumberPrototype::method_toFixed(), QV4::RuntimeHelpers::numberToString(), and qt_doubleToAscii().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qt_is_inf() [2/2]

static Q_DECL_CONST_FUNCTION bool qt_is_inf ( float f)
inlinestatic

Definition at line 127 of file qnumeric_p.h.

References qnumeric_std_wrapper::isinf().

+ Here is the call graph for this function:

◆ qt_is_nan() [1/2]

◆ qt_is_nan() [2/2]

static Q_DECL_CONST_FUNCTION bool qt_is_nan ( float f)
inlinestatic

Definition at line 132 of file qnumeric_p.h.

References qnumeric_std_wrapper::isnan().

+ Here is the call graph for this function:

◆ qt_qnan()

constexpr static Q_DECL_CONST_FUNCTION double qt_qnan ( )
inlinestaticconstexprnoexcept

Definition at line 100 of file qnumeric_p.h.

Referenced by DateFromTime(), DayFromMonth(), QTextStreamPrivate::getReal(), QV4::NumberPrototype::init(), QV4::Date::init(), MakeDay(), QV4::MathObject::method_abs(), QV4::MathObject::method_acos(), QV4::MathObject::method_acosh(), QV4::MathObject::method_asin(), QV4::MathObject::method_atan(), QV4::MathObject::method_atan2(), QV4::MathObject::method_atanh(), QV4::MathObject::method_cbrt(), QV4::MathObject::method_ceil(), QV4::StringPrototype::method_charCodeAt(), QV4::MathObject::method_cos(), QV4::MathObject::method_cosh(), QV4::MathObject::method_exp(), QV4::MathObject::method_expm1(), QV4::MathObject::method_floor(), QV4::MathObject::method_fround(), QV4::MathObject::method_log(), QV4::MathObject::method_log10(), QV4::MathObject::method_log1p(), QV4::MathObject::method_log2(), QV4::DatePrototype::method_parse(), QV4::MathObject::method_pow(), QV4::MathObject::method_round(), QQuickJSContext2D::method_set_globalAlpha(), QQuickJSContext2D::method_set_shadowOffsetX(), QQuickJSContext2D::method_set_shadowOffsetY(), QV4::DatePrototype::method_setDate(), QV4::DataViewPrototype::method_setFloat(), QV4::DatePrototype::method_setFullYear(), QV4::DatePrototype::method_setHours(), QV4::DatePrototype::method_setMilliseconds(), QV4::DatePrototype::method_setMinutes(), QV4::DatePrototype::method_setMonth(), QV4::DatePrototype::method_setSeconds(), QV4::DatePrototype::method_setTime(), QV4::DatePrototype::method_setUTCDate(), QV4::DatePrototype::method_setUTCFullYear(), QV4::DatePrototype::method_setUTCHours(), QV4::DatePrototype::method_setUTCMilliseconds(), QV4::DatePrototype::method_setUTCMinutes(), QV4::DatePrototype::method_setUTCMonth(), QV4::DatePrototype::method_setUTCSeconds(), QV4::DatePrototype::method_setYear(), QV4::MathObject::method_sign(), QV4::MathObject::method_sin(), QV4::MathObject::method_sinh(), QV4::MathObject::method_sqrt(), QV4::MathObject::method_tan(), QV4::MathObject::method_tanh(), QV4::MathObject::method_trunc(), MonthFromTime(), QV4::Date::operator double(), ParseString(), qt_asciiToDouble(), and TimeClip().

◆ qt_saturate()

template<typename To , typename From >
static constexpr auto qt_saturate ( From x)
staticconstexpr

Definition at line 442 of file qnumeric_p.h.