1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include "qjsnumbercoercion.h"
5
6QT_BEGIN_NAMESPACE
7
8/*!
9 \since 6.1
10 \class QJSNumberCoercion
11 \internal
12
13 \brief Implements the JavaScript double-to-int coercion.
14 */
15
16/*!
17 \fn bool QJSNumberCoercion::isInteger(double d)
18 \internal
19 \deprecated 6.7
20 */
21
22/*!
23 \fn bool QJSNumberCoercion::isArrayIndex(double d)
24 \internal
25
26 Checks whether \a d contains a value that can serve as an index into an array.
27 For that, \a d must be a non-negative value representable as an int.
28 */
29
30/*!
31 \fn int QJSNumberCoercion::toInteger(double d)
32 \internal
33
34 Coerces the given \a d to a 32bit integer by JavaScript rules and returns
35 the result.
36 */
37
38/*!
39 \fn bool equals(double lhs, double rhs)
40 \internal
41
42 Compares \a lhs and \a rhs bit by bit without causing a compile warning.
43 Returns the \c true if they are equal, or \c false if not.
44 */
45
46QT_END_NAMESPACE
47

source code of qtdeclarative/src/qml/common/qjsnumbercoercion.cpp