This commit is contained in:
Бранимир Караџић
2024-01-01 20:03:21 -08:00
parent 03fd6f4771
commit 6c2989d95d
3 changed files with 16 additions and 16 deletions

View File

@@ -138,15 +138,15 @@ namespace bx
return float( (0.0f < _a) - (0.0f > _a) );
}
inline BX_CONSTEXPR_FUNC bool signbit(float _a)
inline BX_CONSTEXPR_FUNC bool signBit(float _a)
{
return -0.0f == _a ? 0.0f != _a : 0.0f > _a;
}
inline BX_CONSTEXPR_FUNC float copysign(float _value, float _sign)
inline BX_CONSTEXPR_FUNC float copySign(float _value, float _sign)
{
#if BX_COMPILER_MSVC
return signbit(_value) != signbit(_sign) ? -_value : _value;
return signBit(_value) != signBit(_sign) ? -_value : _value;
#else
return __builtin_copysign(_value, _sign);
#endif // BX_COMPILER_MSVC

View File

@@ -184,7 +184,7 @@ namespace bx
///
/// @returns `true` if `_a` is less than zero, otherwise returns `false`.
///
BX_CONSTEXPR_FUNC bool signbit(float _a);
BX_CONSTEXPR_FUNC bool signBit(float _a);
/// Returns value with the magnitude `_value`, and the sign of `_sign`.
///
@@ -193,7 +193,7 @@ namespace bx
///
/// @returns Value with the magnitude `_value`, and the sign of `_sign`.
///
BX_CONSTEXPR_FUNC float copysign(float _value, float _sign);
BX_CONSTEXPR_FUNC float copySign(float _value, float _sign);
/// Returns the absolute of _a.
///