|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::abs (const vector< T, N > &x) |
| Returns the absolute values of each element. More...
|
|
template<std::size_t N> |
constexpr bool | math::all (const vector< bool, N > &x) noexcept |
| Checks if all elements of a boolean vector are true . More...
|
|
template<std::floating_point T, std::size_t N> |
T | math::angle (const vector< T, N > &from, const vector< T, N > &to) |
| Calculates the angle between two direction vectors. More...
|
|
template<std::size_t N> |
constexpr bool | math::any (const vector< bool, N > &x) noexcept |
| Checks if any elements of a boolean vector are true . More...
|
|
template<std::floating_point T, std::size_t N> |
constexpr vector< T, N > | math::ceil (const vector< T, N > &x) |
| Performs an element-wise ceil operation. More...
|
|
template<std::floating_point T, std::size_t N> |
vector< T, N > | math::clamp_length (const vector< T, N > &x, T max_length) |
| Clamps the length of a vector. More...
|
|
template<class T > |
constexpr vector< T, 3 > | math::cross (const vector< T, 3 > &x, const vector< T, 3 > &y) noexcept |
| Calculates the cross product of two vectors. More...
|
|
template<std::floating_point T, std::size_t N> |
T | math::distance (const vector< T, N > &p0, const vector< T, N > &p1) |
| Calculates the distance between two points. More...
|
|
template<class T , std::size_t N> |
constexpr T | math::dot (const vector< T, N > &x, const vector< T, N > &y) noexcept |
| Calculates the dot product of two vectors. More...
|
|
template<class T , std::size_t N> |
constexpr vector< bool, N > | math::equal (const vector< T, N > &x, const vector< T, N > &y) noexcept |
| Compares two vectors for equality. More...
|
|
template<std::floating_point T, std::size_t N> |
constexpr vector< T, N > | math::floor (const vector< T, N > &x) |
| Performs a element-wise floor operation. More...
|
|
template<std::floating_point T, std::size_t N> |
constexpr vector< T, N > | math::fract (const vector< T, N > &x) |
| Returns a vector containing the fractional part of each element. More...
|
|
template<class T , std::size_t N> |
constexpr vector< bool, N > | math::greater_than (const vector< T, N > &x, const vector< T, N > &y) noexcept |
| Performs a element-wise greater-than comparison of two vectors. More...
|
|
template<class T , std::size_t N> |
constexpr vector< bool, N > | math::greater_than_equal (const vector< T, N > &x, const vector< T, N > &y) noexcept |
| Performs a element-wise greater-than or equal-to comparison of two vectors. More...
|
|
template<std::floating_point T, std::size_t N> |
T | math::inv_length (const vector< T, N > &x) |
| Calculates the inverse length of a vector. More...
|
|
template<std::floating_point T, std::size_t N> |
T | math::length (const vector< T, N > &x) |
| Calculates the length of a vector. More...
|
|
template<class T , std::size_t N> |
constexpr vector< bool, N > | math::less_than (const vector< T, N > &x, const vector< T, N > &y) noexcept |
| Performs a element-wise less-than comparison of two vectors. More...
|
|
template<class T , std::size_t N> |
constexpr vector< bool, N > | math::less_than_equal (const vector< T, N > &x, const vector< T, N > &y) noexcept |
| Performs a element-wise less-than or equal-to comparison of two vectors. More...
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::max (const vector< T, N > &x, const vector< T, N > &y) |
| Returns a vector containing the maximum elements of two vectors. More...
|
|
template<class T , std::size_t N> |
constexpr T | math::max (const vector< T, N > &x) |
| Returns the value of the greatest element in a vector. More...
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::min (const vector< T, N > &x, const vector< T, N > &y) |
| Returns a vector containing the minimum elements of two vectors. More...
|
|
template<class T , std::size_t N> |
constexpr T | math::min (const vector< T, N > &x) |
| Returns the value of the smallest element in a vector. More...
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::negate (const vector< T, N > &x) noexcept |
| Negates a vector. More...
|
|
template<std::floating_point T, std::size_t N> |
vector< T, N > | math::normalize (const vector< T, N > &x) |
| Calculates the unit vector in the same direction as the original vector. More...
|
|
template<class T , std::size_t N> |
constexpr vector< bool, N > | math::logical_not (const vector< T, N > &x) noexcept |
| Logically inverts a boolean vector. More...
|
|
template<class T , std::size_t N> |
constexpr vector< bool, N > | math::not_equal (const vector< T, N > &x, const vector< T, N > &y) noexcept |
| Compares two vectors for inequality. More...
|
|
template<std::floating_point T, std::size_t N> |
constexpr vector< T, N > | math::round (const vector< T, N > &x) |
| Performs a element-wise round operation. More...
|
|
template<std::floating_point T, std::size_t N> |
constexpr vector< T, N > | math::sign (const vector< T, N > &x) |
| Returns a vector containing the signs of each element. More...
|
|
template<std::floating_point T> |
T | math::signed_angle (const vector< T, 3 > &x, const vector< T, 3 > &y, const vector< T, 3 > &n) |
| Calculates the signed angle between two direction vectors about axis. More...
|
|
template<class T , std::size_t N> |
constexpr T | math::sqr_distance (const vector< T, N > &p0, const vector< T, N > &p1) noexcept |
| Calculates the square distance between two points. More...
|
|
template<class T , std::size_t N> |
constexpr T | math::sqr_length (const vector< T, N > &x) noexcept |
| Calculates the square length of a vector. More...
|
|
template<std::floating_point T, std::size_t N> |
vector< T, N > | math::sqrt (const vector< T, N > &x) |
| Takes the square root of each element. More...
|
|
template<class T , std::size_t N> |
constexpr T | math::sum (const vector< T, N > &x) noexcept |
| Calculates the sum of all elements in a vector. More...
|
|
template<std::size_t... Indices, class T , std::size_t N> |
constexpr vector< T, sizeof...(Indices)> | math::swizzle (const vector< T, N > &x) noexcept |
| Makes an m-dimensional vector by rearranging and/or duplicating elements of an n-dimensional vector. More...
|
|
template<class T > |
constexpr T | math::triple (const vector< T, 3 > &x, const vector< T, 3 > &y, const vector< T, 3 > &z) noexcept |
| Calculates the triple product of three vectors. More...
|
|
template<std::floating_point T, std::size_t N> |
constexpr vector< T, N > | math::trunc (const vector< T, N > &x) |
| Performs a element-wise trunc operation. More...
|
|
template<std::floating_point T, std::size_t N> |
vector< T, N > | math::sqrt (const vector< T, N > &x, const vector< T, N > &y) |
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::operators::operator+ (const vector< T, N > &x, const vector< T, N > &y) noexcept |
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::operators::operator/ (const vector< T, N > &x, const vector< T, N > &y) noexcept |
| Divides a vector by a value. More...
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::operators::operator/ (const vector< T, N > &x, T y) noexcept |
| Divides a vector by a value. More...
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::operators::operator/ (T x, const vector< T, N > &y) noexcept |
| Divides a vector by a value. More...
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::operators::operator* (const vector< T, N > &x, const vector< T, N > &y) noexcept |
| Multiplies two values. More...
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::operators::operator- (const vector< T, N > &x) noexcept |
| Negates a vector. More...
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::operators::operator- (const vector< T, N > &x, const vector< T, N > &y) noexcept |
| Subtracts a value by another value. More...
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::operators::operator- (const vector< T, N > &x, T y) noexcept |
| Subtracts a value by another value. More...
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::operators::operator- (T x, const vector< T, N > &y) noexcept |
| Subtracts a value by another value. More...
|
|
template<class T , std::size_t N> |
constexpr bool | math::operators::operator== (const vector< T, N > &x, const vector< T, N > &y) noexcept |
| Tests two vector for equality. More...
|
|
template<class T , std::size_t N> |
constexpr bool | math::operators::operator!= (const vector< T, N > &x, const vector< T, N > &y) noexcept |
| Tests two vector for inequality. More...
|
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::add (const vector< T, N > &x, const vector< T, N > &y) noexcept |
| Adds two values. More...
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::add (const vector< T, N > &x, T y) noexcept |
| Adds two values. More...
|
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::clamp (const vector< T, N > &x, const vector< T, N > &min, const vector< T, N > &max) |
| Clamps the values of a vector's elements. More...
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::clamp (const vector< T, N > &x, T min, T max) |
| Clamps the values of a vector's elements. More...
|
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::div (const vector< T, N > &x, const vector< T, N > &y) noexcept |
| Divides a vector by a value. More...
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::div (const vector< T, N > &x, T y) noexcept |
| Divides a vector by a value. More...
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::div (T x, const vector< T, N > &y) noexcept |
| Divides a vector by a value. More...
|
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::fma (const vector< T, N > &x, const vector< T, N > &y, const vector< T, N > &z) |
| Performs a multiply-add operation. More...
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::fma (const vector< T, N > &x, T y, T z) |
| Performs a multiply-add operation. More...
|
|
|
template<std::size_t I, class T , std::size_t N> |
constexpr T & | math::get (math::vector< T, N > &v) noexcept |
| Extracts the Ith element from a vector. More...
|
|
template<std::size_t I, class T , std::size_t N> |
constexpr T && | math::get (math::vector< T, N > &&v) noexcept |
| Extracts the Ith element from a vector. More...
|
|
template<std::size_t I, class T , std::size_t N> |
constexpr const T & | math::get (const math::vector< T, N > &v) noexcept |
| Extracts the Ith element from a vector. More...
|
|
template<std::size_t I, class T , std::size_t N> |
constexpr const T && | math::get (const math::vector< T, N > &&v) noexcept |
| Extracts the Ith element from a vector. More...
|
|
|
template<std::floating_point T, std::size_t N> |
constexpr vector< T, N > | math::mod (const vector< T, N > &x, const vector< T, N > &y) |
| Calculates the element-wise remainder of the division operation x / y . More...
|
|
template<std::floating_point T, std::size_t N> |
constexpr vector< T, N > | math::mod (const vector< T, N > &x, T y) |
| Calculates the element-wise remainder of the division operation x / y . More...
|
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::mul (const vector< T, N > &x, const vector< T, N > &y) noexcept |
| Multiplies two values. More...
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::mul (const vector< T, N > &x, T y) noexcept |
| Multiplies two values. More...
|
|
|
template<std::floating_point T, std::size_t N> |
vector< T, N > | math::pow (const vector< T, N > &x, const vector< T, N > &y) |
| Raises each element to a power. More...
|
|
template<std::floating_point T, std::size_t N> |
vector< T, N > | math::pow (const vector< T, N > &x, T y) |
| Raises each element to a power. More...
|
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::sub (const vector< T, N > &x, const vector< T, N > &y) noexcept |
| Subtracts a value by another value. More...
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::sub (const vector< T, N > &x, T y) noexcept |
| Subtracts a value by another value. More...
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::sub (T x, const vector< T, N > &y) noexcept |
| Subtracts a value by another value. More...
|
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::operators::operator+ (const vector< T, N > &x, T y) noexcept |
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::operators::operator+ (T x, const vector< T, N > &y) noexcept |
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::operators::operator* (const vector< T, N > &x, T y) noexcept |
| Multiplies two values. More...
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > | math::operators::operator* (T x, const vector< T, N > &y) noexcept |
| Multiplies two values. More...
|
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > & | math::operators::operator+= (vector< T, N > &x, const vector< T, N > &y) noexcept |
| Adds two values and stores the result in the first value. More...
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > & | math::operators::operator+= (vector< T, N > &x, T y) noexcept |
| Adds two values and stores the result in the first value. More...
|
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > & | math::operators::operator-= (vector< T, N > &x, const vector< T, N > &y) noexcept |
| Subtracts the first value by the second value and stores the result in the first value. More...
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > & | math::operators::operator-= (vector< T, N > &x, T y) noexcept |
| Subtracts the first value by the second value and stores the result in the first value. More...
|
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > & | math::operators::operator*= (vector< T, N > &x, const vector< T, N > &y) noexcept |
| Multiplies two values and stores the result in the first value. More...
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > & | math::operators::operator*= (vector< T, N > &x, T y) noexcept |
| Multiplies two values and stores the result in the first value. More...
|
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > & | math::operators::operator/= (vector< T, N > &x, const vector< T, N > &y) noexcept |
| Divides the first value by the second value and stores the result in the first value. More...
|
|
template<class T , std::size_t N> |
constexpr vector< T, N > & | math::operators::operator/= (vector< T, N > &x, T y) noexcept |
| Divides the first value by the second value and stores the result in the first value. More...
|
|