QJSNumberCoercion Class
Implements the JavaScript double-to-int coercion. More...
| Header: | #include <QJSNumberCoercion> |
Static Public Members
| bool | isArrayIndex(double d) |
| bool | isInteger(double d) |
| int | toInteger(double d) |
Detailed Description
\since6.1 \internal
Member Function Documentation
[static constexpr] bool QJSNumberCoercion::isArrayIndex(double d)
\internal
Checks whether d contains a value that can serve as an index into an array. For that, d must be a non-negative value representable as an int.
[static constexpr] bool QJSNumberCoercion::isInteger(double d)
\internal\deprecated 6.7
[static constexpr] int QJSNumberCoercion::toInteger(double d)
\internal
Coerces the given d to a 32bit integer by JavaScript rules and returns the result.