|
| template<typename T> |
| constexpr T | Lerp (T a, T b, float 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 floating-point values.
|
| template<typename T> |
| constexpr T | Ceil (T value) |
| | Ceiling function for floating-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 float | Smoothstep (float edge0, float edge1, float x) |
| | Smoothstep interpolation between edge0 and edge1.
|
| constexpr float | CTInverseSqrt (float x) |
| | Fast compile-time inverse square root (single Newton step).
|
| constexpr float | CTSqrt (const float x) |
| | Fast compile-time square root using bit manipulation.
|
| float | InverseSqrt (const float x) |
| | Inverse square root using hardware rsqrt.
|
| float | Sqrt (const float x) |
| | Standard square root using hardware sqrt.
|
| 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) |
| | Adds two matrices element-wise.
|
| 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) |
| | Subtracts two matrices element-wise.
|
| template<typename T, size_t Rows, size_t Cols> |
| constexpr Matrix< T, Rows, Cols > | operator* (const Matrix< T, Rows, Cols > &a, const T &scalar) |
| | Multiplies each matrix element by a 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) |
| | Multiplies each matrix element by a scalar.
|
| template<typename T, size_t Rows, size_t Cols> |
| constexpr Matrix< T, Rows, Cols > | operator/ (const Matrix< T, Rows, Cols > &a, const T &scalar) |
| | Divides each matrix element by a 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) |
| | Performs matrix multiplication (dot product).
|
| 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, 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< float, 4, 4 > | Translate (float tx, float ty, float 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 > | 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.
|
| constexpr float | Radians (float degrees) |
| | Convert degrees to radians.
|
| constexpr Vector< float, 3 > | Radians (Vector< float, 3 > vector) |
| | Convert a Vector3s components from degrees to radians.
|
| constexpr float | Degrees (float radians) |
| | Convert radians to degrees.
|
| constexpr Vector< float, 3 > | Degrees (Vector< float, 3 > vector) |
| | Convert a Vector3s components from radians to degrees.
|
| template<Detail::PrecisionMode Mode = Detail::PrecisionMode::Standard> |
| float | Sin (float radians) |
| | Computes the sine of an angle in radians using a fast polynomial approximation.
|
| template<Detail::PrecisionMode Mode = Detail::PrecisionMode::Standard> |
| float | Cos (float radians) |
| | Computes the cosine 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 > &a, const Vector< T, N > &b) |
| | Component-wise addition of two vectors.
|
| template<typename T, size_t N> |
| constexpr Vector< T, N > | operator- (const Vector< T, N > &a, const Vector< T, N > &b) |
| | Component-wise subtraction of two vectors.
|
| template<typename T, size_t N> |
| constexpr Vector< T, N > | operator* (const Vector< T, N > &a, const T &scalar) |
| | Scalar multiplication (vector * scalar).
|
| template<typename T, size_t N> |
| constexpr Vector< T, N > | operator* (const T &scalar, const Vector< T, N > &a) |
| | Scalar multiplication (scalar * vector).
|
| template<typename T, size_t N> |
| constexpr Vector< T, N > | operator/ (const Vector< T, N > &a, const T &scalar) |
| | Scalar division of a vector.
|
| template<typename T, size_t N> |
| constexpr Vector< T, N > & | operator+= (Vector< T, N > &a, const Vector< T, N > &b) |
| | Compound addition assignment (vector += vector).
|
| template<typename T, size_t N> |
| constexpr Vector< T, N > & | operator-= (Vector< T, N > &a, const Vector< T, N > &b) |
| | Compound subtraction assignment (vector -= vector).
|
| template<typename T, size_t N> |
| constexpr Vector< T, N > & | operator*= (Vector< T, N > &a, const T &scalar) |
| | Compound scalar multiplication assignment (vector *= scalar).
|
| template<typename T, size_t N> |
| constexpr Vector< T, N > & | operator/= (Vector< T, N > &a, const T &scalar) |
| | Compound scalar division assignment (vector /= 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) |
| | Equality comparison for 2D vectors.
|
| template<typename T> |
| constexpr bool | operator!= (const Vector< T, 2 > &lhs, const Vector< T, 2 > &rhs) |
| | Inequality comparison for 2D vectors.
|
| template<typename T> |
| constexpr bool | operator== (const Vector< T, 3 > &lhs, const Vector< T, 3 > &rhs) |
| | Equality comparison for 3D vectors.
|
| template<typename T> |
| constexpr bool | operator!= (const Vector< T, 3 > &lhs, const Vector< T, 3 > &rhs) |
| | Inequality comparison for 3D vectors.
|
| template<typename T> |
| constexpr bool | operator== (const Vector< T, 4 > &lhs, const Vector< T, 4 > &rhs) |
| | Equality comparison for 4D vectors.
|
| template<typename T> |
| constexpr bool | operator!= (const Vector< T, 4 > &lhs, const Vector< T, 4 > &rhs) |
| | Inequality comparison for 4D vectors.
|