|
| template<typename T> |
| constexpr T | Lerp (T a, T b, f32 t) |
| | Linear interpolation between a and b by factor t.
|
| template<typename T> |
| constexpr T | Min (T a, T b) |
| | Return the minimum of two values.
|
| template<typename T> |
| constexpr T | Max (T a, T b) |
| | Return the maximum of two values.
|
| template<typename T> |
| constexpr T | Clamp (T value, T min, T max) |
| | Clamp a value between a minimum and maximum.
|
| template<typename T> |
| constexpr T | Saturate (T value) |
| | Clamp a value to the [0,1] range.
|
| template<typename T> |
| constexpr T | Sign (T value) |
| | Signum function: returns -1, 0, or +1.
|
| template<typename T> |
| constexpr T | Abs (T value) |
| | Absolute value.
|
| template<typename T> |
| constexpr T | Floor (T value) |
| | Floor function for f32ing-point values.
|
| template<typename T> |
| constexpr T | Ceil (T value) |
| | Ceiling function for f32ing-point values.
|
| template<typename T> |
| constexpr T | Fract (T value) |
| | Fractional part of a value.
|
| template<typename T> |
| constexpr T | Square (T value) |
| | Square of a value.
|
| template<typename T> |
| constexpr T | Cube (T value) |
| | Cube of a value.
|
| constexpr f32 | Smoothstep (f32 edge0, f32 edge1, f32 x) |
| | Smoothstep interpolation between edge0 and edge1.
|
| constexpr f32 | CTInverseSqrt (f32 x) |
| | Fast compile-time inverse square root (single Newton step).
|
| constexpr f32 | CTSqrt (const f32 x) |
| | Fast compile-time square root using bit manipulation.
|
| f32 | InverseSqrt (const f32 x) |
| | Inverse square root using hardware rsqrt.
|
| f32 | Sqrt (const f32 x) |
| | Standard square root using hardware sqrt.
|
| template<typename T, size_t Rows, size_t Cols> |
| constexpr bool | operator== (const Matrix< T, Rows, Cols > &a, const Matrix< T, Rows, Cols > &b) |
| template<typename T, size_t Rows, size_t Cols> |
| constexpr bool | operator!= (const Matrix< T, Rows, Cols > &a, const Matrix< T, Rows, Cols > &b) noexcept |
| template<typename T, size_t Rows, size_t Cols> |
| constexpr Matrix< T, Rows, Cols > | operator+ (const Matrix< T, Rows, Cols > &a, const Matrix< T, Rows, Cols > &b) |
| template<typename T, size_t Rows, size_t Cols> |
| constexpr Matrix< T, Rows, Cols > | operator- (const Matrix< T, Rows, Cols > &a, const Matrix< T, Rows, Cols > &b) |
| template<typename T, size_t Rows, size_t Cols> |
| constexpr Matrix< T, Rows, Cols > | operator* (const Matrix< T, Rows, Cols > &a, const T &scalar) |
| template<typename T, size_t Rows, size_t Cols> |
| constexpr Matrix< T, Rows, Cols > | operator* (const T &scalar, const Matrix< T, Rows, Cols > &a) |
| template<typename T> |
| constexpr Vector< T, 4 > | operator* (const Matrix< T, 4, 4 > &m, const Vector< T, 4 > &v) |
| template<typename T> |
| constexpr Vector< T, 3 > | operator* (const Matrix< T, 4, 4 > &m, const Vector< T, 3 > &v) |
| template<typename T> |
| constexpr Vector< T, 4 > | operator* (const Vector< T, 4 > &v, const Matrix< T, 4, 4 > &m) |
| template<typename T, size_t Rows, size_t Cols> |
| constexpr Matrix< T, Rows, Cols > | operator/ (const Matrix< T, Rows, Cols > &a, const T &scalar) |
| template<typename T, size_t RowsA, size_t ColsA, size_t ColsB> |
| constexpr Matrix< T, RowsA, ColsB > | operator* (const Matrix< T, RowsA, ColsA > &a, const Matrix< T, ColsA, ColsB > &b) |
| template<typename T, size_t Rows, size_t Cols> |
| constexpr Matrix< T, Rows, Cols > | Zero () |
| | Generates a zero matrix of size Rows x Cols.
|
| template<typename T, size_t Rows, size_t Cols> |
| constexpr Matrix< T, Cols, Rows > | Transpose (const Matrix< T, Rows, Cols > &a) |
| | Transposes the given matrix (rows become columns).
|
| template<typename T> |
| constexpr Matrix< T, 4, 4 > | RotateX (T angle) |
| | Creates a 4x4 rotation matrix around the X axis.
|
| template<typename T> |
| constexpr Matrix< T, 4, 4 > | RotateY (T angle) |
| | Creates a 4x4 rotation matrix around the Y axis.
|
| template<typename T> |
| constexpr Matrix< T, 4, 4 > | RotateZ (T angle) |
| | Creates a 4x4 rotation matrix around the Z axis.
|
| template<typename T> |
| constexpr Matrix< T, 4, 4 > | Rotate (T angle, const Vector< T, 3 > &axis) |
| | Creates a 4x4 rotation matrix around an arbitrary axis.
|
| template<typename T> |
| constexpr Matrix< T, 2, 2 > | Scale (T tx, T ty) |
| | Constructs a 2D scaling matrix.
|
| template<typename T> |
| constexpr Matrix< T, 4, 4 > | Scale (T sx, T sy, T sz) |
| | Constructs a 4x4 3D non-uniform scaling matrix.
|
| template<typename T> |
| constexpr Matrix< T, 4, 4 > | Scale (const Vector< T, 3 > &s) |
| | Constructs a 4x4 3D non-uniform scaling matrix from a vector.
|
| template<typename T, size_t N> |
| constexpr Matrix< T, N, N > | Scale (T s) |
| | Constructs a uniform scaling matrix of size N x N.
|
| template<typename T> |
| constexpr Matrix< T, 3, 3 > | Translate (T tx, T ty) |
| | Constructs a 3x3 2D translation matrix.
|
| constexpr Matrix< f32, 4, 4 > | Translate (f32 tx, f32 ty, f32 tz) |
| | Constructs a 4x4 3D translation matrix.
|
| template<typename T> |
| constexpr Matrix< T, 4, 4 > | Translate (const Matrix< T, 4, 4 > &m, const Vector< T, 3 > &v) |
| | Applies a 3D translation to a 4x4 matrix using a vector.
|
| template<typename T, size_t N> |
| constexpr Matrix< T, N, N > | Identity () |
| | Generates an identity matrix of size NxN.
|
| template<typename T, size_t N> |
| constexpr T | Trace (const Matrix< T, N, N > &a) |
| | Computes the trace (sum of diagonal elements) of a square matrix.
|
| template<typename T, size_t Rows, size_t Cols> |
| constexpr T | Norm (const Matrix< T, Rows, Cols > &a) |
| | Computes the Frobenius norm of the matrix.
|
| template<typename T, size_t Rows, size_t Cols> |
| constexpr Matrix< T, Rows, Cols > | Normalize (const Matrix< T, Rows, Cols > &a) |
| | Normalizes the matrix by dividing each element by the Frobenius norm.
|
| template<typename T> |
| constexpr T | Determinant (const Matrix< T, 2, 2 > &a) |
| | Computes the determinant of a 2x2 matrix.
|
| template<typename T> |
| constexpr T | Determinant (const Matrix< T, 3, 3 > &a) |
| | Computes the determinant of a 3x3 matrix.
|
| template<typename T> |
| constexpr T | Determinant (const Matrix< T, 4, 4 > &a) |
| | Computes the determinant of a 4x4 matrix.
|
| template<typename T> |
| constexpr Matrix< T, 2, 2 > | Inverse (const Matrix< T, 2, 2 > &a) |
| | Computes the inverse of a 2x2 matrix.
|
| template<typename T> |
| constexpr Matrix< T, 3, 3 > | Inverse (const Matrix< T, 3, 3 > &a) |
| | Computes the inverse of a 3x3 matrix.
|
| template<typename T> |
| constexpr Matrix< T, 4, 4 > | Inverse (const Matrix< T, 4, 4 > &a) |
| | Computes the inverse of a 4x4 matrix.
|
| template<typename T> |
| constexpr Matrix< T, 3, 3 > | ToMat3 (const Matrix< T, 4, 4 > &m) |
| | Converts a 4x4 Matrix into a 3x3 Matrix.
|
| template<typename T> |
| constexpr Matrix< T, 4, 4 > | ToMat4 (const Matrix< T, 3, 3 > &m) |
| | Converts a 3x3 Matrix into a 4x4 Matrix.
|
| template<typename T> |
| constexpr Matrix< T, 4, 4 > | LookAt (const Vector< T, 3 > &position, const Vector< T, 3 > &target, const Vector< T, 3 > &up) |
| | Creates a look-at view matrix using position, target, and up vectors.
|
| template<typename T> |
| void | DecomposeTransform (const Matrix< T, 4, 4 > &transform, Vector< T, 3 > &translation, Vector< T, 3 > &rotation, Vector< T, 3 > &scale) |
| | Decomposes a 4x4 transformation matrix into translation, rotation, and scale.
|
| template<typename T> |
| Matrix< T, 4, 4 > | ComposeTransform (const Vector< T, 3 > &translation, const Vector< T, 3 > &rotation, const Vector< T, 3 > &scale) |
| | Helper to compose a transformation matrix from translation, rotation, and scale.
|
| Matrix< f32, 4, 4 > | Perspective (f32 yFov, f32 aspect, f32 zNear, f32 zFar) |
| | Constructs a perspective projection matrix.
|
| template<typename T> |
| constexpr Matrix< T, 4, 4 > | Ortho (T left, T right, T bottom, T top, T zNear, T zFar) |
| | Constructs an orthographic projection matrix.
|
| template<typename T> |
| constexpr bool | operator== (const Quat< T > &rhs, const Quat< T > &lhs) |
| template<typename T> |
| constexpr bool | operator!= (const Quat< T > &rhs, const Quat< T > &lhs) |
| template<typename T> |
| constexpr T | QuatDot (const Quat< T > &quatA, const Quat< T > &quatB) noexcept |
| | Compute the dot product of two quaternions.
|
| template<typename T> |
| constexpr T | QuatLengthSq (const Quat< T > &quat) noexcept |
| | Compute squared length (norm) of a quaternion.
|
| template<typename T> |
| T | QuatLength (const Quat< T > &quat) noexcept |
| | Compute Euclidean length (norm) of a quaternion.
|
| template<typename T> |
| constexpr T | QuatLengthCT (const Quat< T > &quat) noexcept |
| | Compute Euclidean length (norm) of a quaternion (compile-time version).
|
| template<typename T> |
| constexpr Quat< T > | QuatConjugate (const Quat< T > &quat) noexcept |
| | Compute the conjugate of a quaternion.
|
| template<typename T> |
| constexpr Quat< T > | QuatInverse (const Quat< T > &quat) noexcept |
| | Compute the multiplicative inverse of a quaternion.
|
| template<typename T> |
| T | QuatNormalizeInplace (Quat< T > &quat) noexcept |
| | Normalize quaternion in-place.
|
| template<typename T> |
| Quat< T > | QuatNormalize (Quat< T > quat) noexcept |
| | Return normalized copy of quaternion.
|
| template<typename T> |
| constexpr Quat< T > | QuatMul (const Quat< T > &quatA, const Quat< T > &quatB) noexcept |
| | Hamilton product of two quaternions (composition of rotations).
|
| template<typename T> |
| constexpr Vector< T, 3 > | QuatRotate (const Quat< T > &quat, const Vector< T, 3 > &vec) noexcept |
| | Rotate a 3D vector by a quaternion (optimized form).
|
| template<typename T> |
| Quat< T > | QuatFromAxisAngle (const Vector< T, 3 > &axis, T angleRadians) noexcept |
| | Construct quaternion from axis-angle representation.
|
| template<typename T> |
| void | QuatToAxisAngle (const Quat< T > &quat, Vector< T, 3 > &outAxis, T &outAngle) noexcept |
| | Decompose quaternion into axis-angle representation.
|
| template<typename T> |
| Quat< T > | QuatFromEuler (T roll, T pitch, T yaw) noexcept |
| | Construct quaternion from Euler angles (roll, pitch, yaw).
|
| template<typename T> |
| void | QuatToEuler (const Quat< T > &quat, T &outRoll, T &outPitch, T &outYaw) noexcept |
| | Convert quaternion to Euler angles (roll, pitch, yaw).
|
| template<typename T> |
| Quat< T > | QuatLerp (const Quat< T > &quatA, const Quat< T > &quatB, T t) noexcept |
| | Linear interpolation (LERP) between two quaternions.
|
| template<typename T> |
| Quat< T > | QuatNlerp (const Quat< T > &quatA, const Quat< T > &quatB, T t) noexcept |
| | Normalized linear interpolation (NLERP) between two quaternions.
|
| template<typename T> |
| Quat< T > | QuatSlerp (const Quat< T > &quatA, const Quat< T > &quatB, T t) noexcept |
| | Spherical linear interpolation (SLERP) between two quaternions.
|
| template<typename T> |
| Matrix< T, 3, 3 > | QuatToMat3 (const Quat< T > &quatIn) noexcept |
| | Convert quaternion to 3x3 rotation matrix (row-major).
|
| template<typename T> |
| Matrix< T, 4, 4 > | ToMat4 (const Quat< T > &quat) noexcept |
| | Convert quaternion to 4x4 rotation matrix.
|
| template<typename T> |
| Quat< T > | QuatFromMat3 (const Matrix< T, 3, 3 > &mat) noexcept |
| | Convert a 3x3 rotation matrix to a quaternion.
|
| template<typename T> |
| Quat< T > | operator* (const Quat< T > &a, const Quat< T > &b) noexcept |
| | Quaternion multiplication operator (Hamilton product).
|
| template<typename T> |
| Quat< T > | operator* (T s, const Quat< T > &q) noexcept |
| | Scalar * quaternion multiplication (commutative for scalar).
|
| constexpr f32 | PolySinImpl (f32 x) |
| constexpr f32 | PolyCosImpl (f32 x) |
| constexpr f32 | Radians (f32 degrees) |
| | Convert degrees to radians.
|
| constexpr Vector< f32, 3 > | Radians (Vector< f32, 3 > vector) |
| | Convert a Vector3s components from degrees to radians.
|
| constexpr f32 | Degrees (f32 radians) |
| | Convert radians to degrees.
|
| template<typename T> |
| constexpr Vector< T, 3 > | Degrees (Vector< T, 3 > vector) |
| | Convert a Vector3s components from radians to degrees.
|
| template<Detail::PrecisionMode Mode = Detail::PrecisionMode::Standard> |
| f32 | Sin (f32 radians) |
| | Computes the sine of an angle in radians using a fast polynomial approximation.
|
| template<Detail::PrecisionMode Mode = Detail::PrecisionMode::Standard> |
| f32 | Cos (f32 radians) |
| | Computes the cosine of an angle in radians using a fast polynomial approximation.
|
| template<Detail::PrecisionMode Mode = Detail::PrecisionMode::Standard> |
| f32 | Tan (f32 radians) |
| | Computes the tangent of an angle in radians using a fast polynomial approximation.
|
| template<typename T, size_t N> |
| constexpr Vector< T, N > | operator- (const Vector< T, N > &v) |
| template<typename T, size_t N> |
| constexpr Vector< T, N > | operator+ (const Vector< T, N > &a, const Vector< T, N > &b) |
| template<typename T, size_t N> |
| constexpr Vector< T, N > | operator- (const Vector< T, N > &a, const Vector< T, N > &b) |
| template<typename T, size_t N> |
| constexpr Vector< T, N > | operator* (const Vector< T, N > &a, const T &scalar) |
| template<typename T, size_t N> |
| constexpr Vector< T, N > | operator* (const T &scalar, const Vector< T, N > &a) |
| template<typename T, size_t N> |
| constexpr Vector< T, N > | operator/ (const Vector< T, N > &a, const T &scalar) |
| template<typename T, size_t N> |
| constexpr Vector< T, N > & | operator+= (Vector< T, N > &a, const Vector< T, N > &b) |
| template<typename T, size_t N> |
| constexpr Vector< T, N > & | operator* (const Vector< T, N > &a, const Vector< T, N > &b) |
| template<typename T, size_t N> |
| constexpr Vector< T, N > & | operator*= (Vector< T, N > &a, Vector< T, N > &b) |
| template<typename T, size_t N> |
| constexpr Vector< T, N > & | operator-= (Vector< T, N > &a, const Vector< T, N > &b) |
| template<typename T, size_t N> |
| constexpr Vector< T, N > & | operator*= (Vector< T, N > &a, const T &scalar) |
| template<typename T, size_t N> |
| constexpr Vector< T, N > & | operator/= (Vector< T, N > &a, const T &scalar) |
| template<typename T, size_t N> |
| constexpr T | Dot (const Vector< T, N > &a, const Vector< T, N > &b) |
| | Dot product of two vectors.
|
| template<typename T> |
| constexpr Vector< T, 3 > | Cross (const Vector< T, 3 > &a, const Vector< T, 3 > &b) |
| | Cross product for 3D vectors.
|
| template<typename T, size_t N> |
| constexpr T | LengthSq (const Vector< T, N > &a) |
| | Squared length (magnitude) of a vector.
|
| template<typename T, size_t N> |
| T | Length (const Vector< T, N > &a) |
| | Length (magnitude) of a vector.
|
| template<typename T, size_t N> |
| Vector< T, N > | Normalize (const Vector< T, N > &a) |
| | Normalizes a vector to unit length.
|
| template<typename T, size_t N> |
| constexpr Vector< T, N > | Project (const Vector< T, N > &a, const Vector< T, N > &b) |
| | Projects vector a onto vector b.
|
| template<typename T, size_t N> |
| constexpr Vector< T, N > | Reflect (const Vector< T, N > &a, const Vector< T, N > &normal) |
| | Reflects vector a around the given normal.
|
| template<typename T, size_t N> |
| constexpr Vector< T, N > | MinComponent (const Vector< T, N > &a, const Vector< T, N > &b) |
| | Element-wise minimum of two vectors.
|
| template<typename T, size_t N> |
| constexpr Vector< T, N > | MaxComponent (const Vector< T, N > &a, const Vector< T, N > &b) |
| | Element-wise maximum of two vectors.
|
| template<typename T, size_t N> |
| constexpr Vector< T, N > | Abs (const Vector< T, N > &a) |
| | Element-wise absolute value of a vector.
|
| template<typename T, size_t N> |
| constexpr bool | operator== (const Vector< T, N > &a, const Vector< T, N > &b) |
| | Approximate equality comparison with tolerance.
|
| template<typename T, size_t N> |
| constexpr bool | operator!= (const Vector< T, N > &a, const Vector< T, N > &b) |
| | Inequality comparison.
|
| template<typename T, size_t N> |
| T | AngleBetween (const Vector< T, N > &a, const Vector< T, N > &b) |
| | Angle between two vectors in radians.
|
| template<typename T, size_t N> |
| constexpr Vector< T, N > | Lerp (const Vector< T, N > &a, const Vector< T, N > &b, T t) |
| | Linear interpolation between two vectors.
|
| template<typename T> |
| constexpr bool | operator== (const Vector< T, 2 > &lhs, const Vector< T, 2 > &rhs) |
| template<typename T> |
| constexpr bool | operator!= (const Vector< T, 2 > &lhs, const Vector< T, 2 > &rhs) |
| template<typename T> |
| constexpr bool | operator== (const Vector< T, 3 > &lhs, const Vector< T, 3 > &rhs) |
| template<typename T> |
| constexpr bool | operator!= (const Vector< T, 3 > &lhs, const Vector< T, 3 > &rhs) |
| template<typename T> |
| constexpr bool | operator== (const Vector< T, 4 > &lhs, const Vector< T, 4 > &rhs) |
| template<typename T> |
| constexpr bool | operator!= (const Vector< T, 4 > &lhs, const Vector< T, 4 > &rhs) |