|
| template<std::floating_point T> |
| JPL_INLINE constexpr T | ToRadians (T degrees) noexcept |
| | Function to convert degrees to radians.
|
| |
| template<std::floating_point T> |
| JPL_INLINE constexpr T | ToDegrees (T radians) noexcept |
| | Function to convert radians to degrees.
|
| |
| template<std::floating_point T> |
| JPL_INLINE constexpr bool | IsNan (T x) noexcept |
| |
| template<CArithmetic T> |
| JPL_INLINE constexpr auto | Abs (const T &value) noexcept |
| | Standard abs is not constexpr in C++20.
|
| |
| template<std::floating_point T> |
| JPL_INLINE constexpr T | Floor (T value) noexcept |
| | A constexpr implementation of floor.
|
| |
| template<CArithmetic T> |
| JPL_INLINE constexpr T | Sign (T value) noexcept |
| | Sign returns -1 for negative values, 1 for positive, 0 for 0.
|
| |
| template<CArithmetic T> |
| JPL_INLINE constexpr T | Sign2 (T value) noexcept |
| | Sign2 returns -1 for negative values, 1 otherwise.
|
| |
| template<CArithmetic T1, CArithmeticAndOrderedWith< T1 > T2> |
| JPL_INLINE constexpr bool | IsPositiveAndBelow (T1 value, T2 below) noexcept |
| |
| template<std::floating_point T> |
| JPL_INLINE constexpr bool | IsNearlyZero (T value, T errorTolerance=JPL_FLOAT_EPS_V< T >) noexcept |
| |
| template<std::floating_point T> |
| JPL_INLINE constexpr bool | IsNearlyEqual (T a, T b, T tolerance=JPL_FLOAT_EPS_V< T >) noexcept |
| |
| template<std::integral T> |
| JPL_INLINE constexpr bool | IsEven (T number) noexcept |
| |
| template<std::floating_point T> |
| JPL_INLINE std::pair< T, T > | SinCos (T value) noexcept |
| |
| template<std::floating_point T> |
| JPL_INLINE constexpr T | 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 | Lerp (const T &v0, const T &v1, Tt t) noexcept |
| | Linearly interpolate v0 towards v1.
|
| |
| template<std::floating_point T> |
| JPL_INLINE constexpr T | 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, int NR = 2> |
| JPL_INLINE constexpr T | Sqrt (T x) noexcept |
| |
| template<std::floating_point T, int NR = 2> |
| JPL_INLINE constexpr T | InvSqrt (T x) noexcept |
| |
| JPL_INLINE simd | Sqrt (const simd &vec) noexcept |
| | Component-wise square root.
|
| |
| JPL_INLINE simd | InvSqrt (const simd &vec) noexcept |
| | Component-wise inverse square root (1 / sqrt(x))
|
| |
| JPL_INLINE simd | Sign2 (const simd &vec) noexcept |
| | Sign2 returns -1 for negative values, 1 otherwise.
|
| |
| JPL_INLINE simd_mask | IsNearlyZero (const simd &vec, float tolerance=JPL_FLOAT_EPS) noexcept |
| |
| JPL_INLINE simd | FMA (const simd &mul1, const simd &mul2, const simd &addV) noexcept |
| | An overload to match our scalar version in Math.h.
|
| |
| JPL_INLINE simd | Lerp (const simd &a, const simd &b, const simd &t) noexcept |
| |
template<int NR>
requires (NR > 0 && NR <= 2) |
| JPL_INLINE simd | InvSqrtImpl (const simd &vec) noexcept |
| |
| JPL_INLINE simd | InvSqrtFast (const simd &vec) noexcept |
| |
| void | SinCos (simd x, simd &outSin, simd &outCos) noexcept |
| | Sin and Cos for 4-wide 32-bit float vector.
|
| |
| template<CVec3 Vec3> |
| JPL_INLINE constexpr bool | IsNearlyEqual (const Vec3 &a, const Vec3 &b, Internal::FloatOf< Vec3 > tolerance=JPL_FLOAT_EPS_V< Internal::FloatOf< Vec3 > >) noexcept |
| |
| template<CVec3 Vec3> |
| JPL_INLINE constexpr bool | IsNearlyZero (const Vec3 &a, Internal::FloatOf< Vec3 > tolerance=JPL_FLOAT_EPS_V< Internal::FloatOf< Vec3 > >) noexcept |
| |
| template<CVec3 Vec3> |
| JPL_INLINE bool | HasNans (const Vec3 &vec) |
| |
| template<CVec3 Vec3> |
| Vec3 | GetNormalizedPerpendicular (const Vec3 &vec) noexcept |
| |
| template<CVec3 Vec3> |
| void | CreateOrthonormalBasis (const Vec3 &normal, Vec3 &tangent, Vec3 &bitangent) noexcept |
| |
| template<CVec3 Vec3> |
| JPL_INLINE Vec3 | RotateVector (const Vec3 &vector, const Vec3 &rotationAxis, float angleRad) noexcept |
| |
| template<CVec3 Vec3> |
| JPL_INLINE Vec3 | Lerp (const Vec3 &v0, const Vec3 &v1, float t) noexcept |
| |
| JPL_INLINE Vec3Pack | Lerp (const Vec3Pack &v0, const Vec3Pack &v1, simd t) noexcept |
| |
| template<CVec3 Vec3> |
| JPL_INLINE Vec3 | Nlerp (const Vec3 &v0, const Vec3 &v1, float t) noexcept |
| |
| JPL_INLINE Vec3Pack | Nlerp (const Vec3Pack &v0, const Vec3Pack &v1, simd t) noexcept |
| |
| template<CVec3 Vec3> |
| Vec3 | Slerp (const Vec3 &v0, const Vec3 &v1, float t) noexcept |
| | Input vectors must be normalized.
|
| |
| void | Slerp (Vec3Pack &inOutV0, const Vec3Pack &V1, const simd &t) noexcept |
| | Input vectors must be normalized.
|
| |
| template<class Vec3 > |
| JPL_INLINE float | ComputePDF (const Vec3 &normal, const Vec3 &outDirection, float diffusion, bool bIsSpecular) |
| |