mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-18 04:53:06 +01:00
Removed constexpr from functions that use union cast.
This commit is contained in:
@@ -59,37 +59,37 @@ namespace bx
|
||||
return result;
|
||||
}
|
||||
|
||||
inline constexpr BX_CONST_FUNC bool isNan(float _f)
|
||||
inline BX_CONST_FUNC bool isNan(float _f)
|
||||
{
|
||||
const uint32_t tmp = floatToBits(_f) & INT32_MAX;
|
||||
return tmp > UINT32_C(0x7f800000);
|
||||
}
|
||||
|
||||
inline constexpr BX_CONST_FUNC bool isNan(double _f)
|
||||
inline BX_CONST_FUNC bool isNan(double _f)
|
||||
{
|
||||
const uint64_t tmp = doubleToBits(_f) & INT64_MAX;
|
||||
return tmp > UINT64_C(0x7ff0000000000000);
|
||||
}
|
||||
|
||||
inline constexpr BX_CONST_FUNC bool isFinite(float _f)
|
||||
inline BX_CONST_FUNC bool isFinite(float _f)
|
||||
{
|
||||
const uint32_t tmp = floatToBits(_f) & INT32_MAX;
|
||||
return tmp < UINT32_C(0x7f800000);
|
||||
}
|
||||
|
||||
inline constexpr BX_CONST_FUNC bool isFinite(double _f)
|
||||
inline BX_CONST_FUNC bool isFinite(double _f)
|
||||
{
|
||||
const uint64_t tmp = doubleToBits(_f) & INT64_MAX;
|
||||
return tmp < UINT64_C(0x7ff0000000000000);
|
||||
}
|
||||
|
||||
inline constexpr BX_CONST_FUNC bool isInfinite(float _f)
|
||||
inline BX_CONST_FUNC bool isInfinite(float _f)
|
||||
{
|
||||
const uint32_t tmp = floatToBits(_f) & INT32_MAX;
|
||||
return tmp == UINT32_C(0x7f800000);
|
||||
}
|
||||
|
||||
inline constexpr BX_CONST_FUNC bool isInfinite(double _f)
|
||||
inline BX_CONST_FUNC bool isInfinite(double _f)
|
||||
{
|
||||
const uint64_t tmp = doubleToBits(_f) & INT64_MAX;
|
||||
return tmp == UINT64_C(0x7ff0000000000000);
|
||||
|
||||
@@ -88,27 +88,27 @@ namespace bx
|
||||
|
||||
/// Returns true if _f is a number that is NaN.
|
||||
///
|
||||
constexpr BX_CONST_FUNC bool isNan(float _f);
|
||||
BX_CONST_FUNC bool isNan(float _f);
|
||||
|
||||
/// Returns true if _f is a number that is NaN.
|
||||
///
|
||||
constexpr BX_CONST_FUNC bool isNan(double _f);
|
||||
BX_CONST_FUNC bool isNan(double _f);
|
||||
|
||||
/// Returns true if _f is not infinite and is not a NaN.
|
||||
///
|
||||
constexpr BX_CONST_FUNC bool isFinite(float _f);
|
||||
BX_CONST_FUNC bool isFinite(float _f);
|
||||
|
||||
/// Returns true if _f is not infinite and is not a NaN.
|
||||
///
|
||||
constexpr BX_CONST_FUNC bool isFinite(double _f);
|
||||
BX_CONST_FUNC bool isFinite(double _f);
|
||||
|
||||
/// Returns true if _f is infinite and is not a NaN.
|
||||
///
|
||||
constexpr BX_CONST_FUNC bool isInfinite(float _f);
|
||||
BX_CONST_FUNC bool isInfinite(float _f);
|
||||
|
||||
/// Returns true if _f is infinite and is not a NaN.
|
||||
///
|
||||
constexpr BX_CONST_FUNC bool isInfinite(double _f);
|
||||
BX_CONST_FUNC bool isInfinite(double _f);
|
||||
|
||||
/// Returns the largest integer value not greater than _f.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user