![]() |
Qt 6.x
The Qt SDK
|
Implements the JavaScript double-to-int coercion. More...
#include <qjsnumbercoercion.h>
Static Public Member Functions | |
static constexpr bool | isInteger (double d) |
static constexpr int | toInteger (double d) |
static constexpr bool | equals (double lhs, double rhs) |
Implements the JavaScript double-to-int coercion.
Definition at line 12 of file qjsnumbercoercion.h.
|
inlinestaticconstexpr |
Definition at line 30 of file qjsnumbercoercion.h.
References QT_WARNING_DISABLE_FLOAT_COMPARE, QT_WARNING_POP, and QT_WARNING_PUSH.
Referenced by isInteger(), QQmlPrivate::jsExponentiate(), QJSPrimitiveValue::strictlyEquals(), QJSPrimitiveValue::toBoolean(), and toInteger().
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
Coerces the given d to a 32bit integer by JavaScript rules and returns the result.
Definition at line 19 of file qjsnumbercoercion.h.
References d, equals(), i, and toInteger().
Referenced by toInteger().