4#ifndef QJSNUMBERCOERCION_H
5#define QJSNUMBERCOERCION_H
7#include <QtCore/qglobal.h>
23 const int i =
static_cast<int>(
d);
30 static constexpr bool equals(
double lhs,
double rhs)
45 memcpy(&d, &dbl,
sizeof(
double));
48 constexpr int sign()
const
50 return (d >> 63) ? -1 : 1;
53 constexpr bool isDenormal()
const
55 return static_cast<int>((d << 1) >> 53) == 0;
60 return static_cast<int>((d << 1) >> 53) - 1023;
63 constexpr quint64 significant()
const
67 m |= (
static_cast<quint64>(1) << 52);
77 return sign() *
static_cast<int>(significant() >> -
e);
81 return sign() * (
static_cast<int>(significant()) <<
e);
Implements the JavaScript double-to-int coercion.
static constexpr bool equals(double lhs, double rhs)
static constexpr int toInteger(double d)
static constexpr bool isInteger(double d)
Combined button and popup list for selecting options.
#define QT_WARNING_DISABLE_FLOAT_COMPARE
unsigned long long quint64