|
| template<std::floating_point T> |
| JPL_INLINE constexpr T | JPL::Math::ToRadians (T degrees) noexcept |
| | Function to convert degrees to radians.
|
| |
| template<std::floating_point T> |
| JPL_INLINE constexpr T | JPL::Math::ToDegrees (T radians) noexcept |
| | Function to convert radians to degrees.
|
| |
| template<std::floating_point T> |
| JPL_INLINE constexpr bool | JPL::Math::IsNan (T x) noexcept |
| |
| template<CArithmetic T> |
| JPL_INLINE constexpr auto | JPL::Math::Abs (const T &value) noexcept |
| | Standard abs is not constexpr in C++20.
|
| |
| template<std::floating_point T> |
| JPL_INLINE constexpr T | JPL::Math::Floor (T value) noexcept |
| | A constexpr implementation of floor.
|
| |
| template<CArithmetic T> |
| JPL_INLINE constexpr T | JPL::Math::Sign (T value) noexcept |
| | Sign returns -1 for negative values, 1 for positive, 0 for 0.
|
| |
| template<CArithmetic T> |
| JPL_INLINE constexpr T | JPL::Math::Sign2 (T value) noexcept |
| | Sign2 returns -1 for negative values, 1 otherwise.
|
| |
| template<CArithmetic T1, CArithmeticAndOrderedWith< T1 > T2> |
| JPL_INLINE constexpr bool | JPL::Math::IsPositiveAndBelow (T1 value, T2 below) noexcept |
| |
| template<std::floating_point T> |
| JPL_INLINE constexpr bool | JPL::Math::IsNearlyZero (T value, T errorTolerance=JPL_FLOAT_EPS_V< T >) noexcept |
| |
| template<std::floating_point T> |
| JPL_INLINE constexpr bool | JPL::Math::IsNearlyEqual (T a, T b, T tolerance=JPL_FLOAT_EPS_V< T >) noexcept |
| |
| template<std::integral T> |
| JPL_INLINE constexpr bool | JPL::Math::IsEven (T number) noexcept |
| |
| template<std::floating_point T> |
| JPL_INLINE std::pair< T, T > | JPL::Math::SinCos (T value) noexcept |
| |
| template<std::floating_point T> |
| JPL_INLINE constexpr T | JPL::Math::Lerp (const T &v0, const T &v1, T t) noexcept |
| | Linearly interpolate v0 towards v1.
|
| |
| template<std::integral T, std::floating_point Tt> |
| JPL_INLINE constexpr T | JPL::Math::Lerp (const T &v0, const T &v1, Tt t) noexcept |
| | Linearly interpolate v0 towards v1.
|
| |
| template<std::floating_point T> |
| JPL_INLINE constexpr T | JPL::Math::FMA (T a, T b, T c) noexcept |
| | Inlined fuse multiply-add. Compiler in some circumstances is more eager to optimize this than std::fma.
|
| |
| template<std::floating_point T> |
| constexpr T | JPL::Math::Detail::QNan () noexcept |
| | constexpr-friendly quiet NaN (IEEE-754 only)
|
| |
| template<std::floating_point T> |
| constexpr T | JPL::Math::Detail::InvSqrtInitialGuess (T x) noexcept |
| |
| template<std::floating_point T, int NR> |
| constexpr T | JPL::Math::Detail::InvSqrtNewtonRefine (T x, T y) noexcept |
| | Scalar NR on inverse sqrt.
|
| |
| template<std::floating_point T, int NR> |
| constexpr T | JPL::Math::Detail::SqrtConstevalFallback (T x) noexcept |
| | Pure constexpr fallback sqrt using inverse-sqrt NR.
|
| |
| template<std::floating_point T, int NR = 2> |
| JPL_INLINE constexpr T | JPL::Math::Sqrt (T x) noexcept |
| |
| template<std::floating_point T, int NR = 2> |
| JPL_INLINE constexpr T | JPL::Math::InvSqrt (T x) noexcept |
| |