|
(Note that these are not member functions.)
|
template<typename T , std::size_t N> |
bool | operator== (const Vector< T, N > &lhs, const Vector< T, N > &rhs) |
| Equality operator between two vectors. More...
|
|
template<typename T , std::size_t N> |
bool | operator!= (const Vector< T, N > &lhs, const Vector< T, N > &rhs) |
| Inequality operator between two vectors. More...
|
|
template<typename T , std::size_t N> |
Vector< T, N > | operator- (const Vector< T, N > &val) |
| Component-wise unary minus. More...
|
|
template<typename T , typename U , std::size_t N> |
Vector< typename
std::common_type< T, U >::type,
N > | operator+ (const Vector< T, N > &lhs, const Vector< U, N > &rhs) |
| Component-wise addition. More...
|
|
template<typename T , typename U , std::size_t N> |
Vector< T, N > & | operator+= (Vector< T, N > &lhs, const Vector< U, N > &rhs) |
| Component-wise addition and assignment. More...
|
|
template<typename T , typename U , std::size_t N, typename E = typename std::enable_if<std::is_arithmetic<U>::value, U>::type> |
Vector< typename
std::common_type< T, U >::type,
N > | operator+ (const Vector< T, N > &lhs, U rhs) |
| Right scalar addition. More...
|
|
template<typename T , typename U , std::size_t N, typename E = typename std::enable_if<std::is_arithmetic<T>::value, T>::type> |
Vector< typename
std::common_type< T, U >::type,
N > | operator+ (T lhs, const Vector< U, N > &rhs) |
| Left scalar addition. More...
|
|
template<typename T , typename U , std::size_t N> |
Vector< typename
std::common_type< T, U >::type,
N > | operator- (const Vector< T, N > &lhs, const Vector< U, N > &rhs) |
| Component-wise substraction. More...
|
|
template<typename T , typename U , std::size_t N> |
Vector< T, N > & | operator-= (Vector< T, N > &lhs, const Vector< U, N > &rhs) |
| Component-wise substraction and assignment. More...
|
|
template<typename T , typename U , std::size_t N, typename E = typename std::enable_if<std::is_arithmetic<U>::value, U>::type> |
Vector< typename
std::common_type< T, U >::type,
N > | operator- (const Vector< T, N > &lhs, U rhs) |
| Right scalar substraction. More...
|
|
template<typename T , typename U , std::size_t N, typename E = typename std::enable_if<std::is_arithmetic<T>::value, T>::type> |
Vector< typename
std::common_type< T, U >::type,
N > | operator- (T lhs, const Vector< U, N > &rhs) |
| Left scalar substraction. More...
|
|
template<typename T , typename U , std::size_t N> |
Vector< typename
std::common_type< T, U >::type,
N > | operator* (const Vector< T, N > &lhs, const Vector< U, N > &rhs) |
| Component-wise multiplication. More...
|
|
template<typename T , typename U , std::size_t N> |
Vector< T, N > & | operator*= (Vector< T, N > &lhs, const Vector< U, N > &rhs) |
| Component-wise multiplication and assignment. More...
|
|
template<typename T , typename U , std::size_t N, typename E = typename std::enable_if<std::is_arithmetic<U>::value, U>::type> |
Vector< typename
std::common_type< T, U >::type,
N > | operator* (const Vector< T, N > &lhs, U rhs) |
| Right scalar multiplication. More...
|
|
template<typename T , typename U , std::size_t N> |
Vector< T, N > & | operator*= (Vector< T, N > &lhs, U rhs) |
| Right scalar multiplication and assignment. More...
|
|
template<typename T , typename U , std::size_t N, typename E = typename std::enable_if<std::is_arithmetic<T>::value, T>::type> |
Vector< typename
std::common_type< T, U >::type,
N > | operator* (T lhs, const Vector< U, N > &rhs) |
| Left scalar multiplication. More...
|
|
template<typename T , typename U , std::size_t N> |
Vector< typename
std::common_type< T, U >::type,
N > | operator/ (const Vector< T, N > &lhs, const Vector< U, N > &rhs) |
| Component-wise division. More...
|
|
template<typename T , typename U , std::size_t N> |
Vector< T, N > & | operator/= (Vector< T, N > &lhs, const Vector< U, N > &rhs) |
| Component-wise division and assignment. More...
|
|
template<typename T , typename U , std::size_t N, typename E = typename std::enable_if<std::is_arithmetic<U>::value, U>::type> |
Vector< typename
std::common_type< T, U >::type,
N > | operator/ (const Vector< T, N > &lhs, U rhs) |
| Right scalar division. More...
|
|
template<typename T , typename U , std::size_t N> |
Vector< T, N > & | operator/= (Vector< T, N > &lhs, U rhs) |
| Right scalar division and assignment. More...
|
|
template<typename T , typename U , std::size_t N, typename E = typename std::enable_if<std::is_arithmetic<T>::value, T>::type> |
Vector< typename
std::common_type< T, U >::type,
N > | operator/ (T lhs, const Vector< U, N > &rhs) |
| Left scalar division. More...
|
|
template<std::size_t N> |
Vector< bool, N > | operator|| (const Vector< bool, N > &lhs, const Vector< bool, N > &rhs) |
| Component-wise logical or operator. More...
|
|
template<std::size_t N> |
Vector< bool, N > | operator&& (const Vector< bool, N > &lhs, const Vector< bool, N > &rhs) |
| Component-wise logical and operator. More...
|
|
template<typename T , std::size_t N> |
T | dot (const Vector< T, N > &lhs, const Vector< T, N > &rhs) |
| Scalar product. More...
|
|
template<typename T , std::size_t N> |
Vector< T, N > | min (const Vector< T, N > &lhs, const Vector< T, N > &rhs) |
| Component-wise minimum. More...
|
|
template<typename T , std::size_t N> |
Vector< T, N > | max (const Vector< T, N > &lhs, const Vector< T, N > &rhs) |
| Component-wise maximum. More...
|
|
template<typename T , std::size_t N> |
Vector< T, N > | abs (const Vector< T, N > &val) |
| Component-wise absolute value. More...
|
|
template<typename T , std::size_t N> |
Vector< bool, N > | equals (const Vector< T, N > &lhs, const Vector< T, N > &rhs) |
| Component-wise equality operator. More...
|
|
template<typename T , std::size_t N> |
Vector< bool, N > | lessThan (const Vector< T, N > &lhs, const Vector< T, N > &rhs) |
| Component-wise comparison operator. More...
|
|
template<typename T , std::size_t N> |
Vector< bool, N > | greaterThan (const Vector< T, N > &lhs, const Vector< T, N > &rhs) |
| Component-wise comparison operator. More...
|
|
template<typename T , std::size_t N> |
Vector< T, N > | select (const Vector< bool, N > &cond, const Vector< T, N > &lhs, const Vector< T, N > &rhs) |
| Component-wise selection operator. More...
|
|
template<typename T , std::size_t N> |
Vector< T, N > | clamp (const Vector< T, N > &val, const Vector< T, N > &lo, const Vector< T, N > &hi) |
| Component-wise clamp function. More...
|
|
template<typename T , std::size_t N> |
Vector< T, N > | clamp (const Vector< T, N > &val, T lo, T hi) |
| Component-wise clamp function. More...
|
|
template<typename T , typename U , std::size_t N> |
Vector< typename
std::common_type< T, U >::type,
N > | lerp (const Vector< T, N > &lhs, const Vector< T, N > &rhs, U t) |
| Component-wise lerp function. More...
|
|
template<typename T , std::size_t N> |
T | manhattanLength (const Vector< T, N > &vec) |
| Manhattan length of a vector. More...
|
|
template<typename T , std::size_t N> |
T | squareLength (const Vector< T, N > &vec) |
| Square Euclidean length of a vector. More...
|
|
template<typename T , std::size_t N> |
T | euclideanLength (const Vector< T, N > &vec) |
| Euclidean length of a vector. More...
|
|
template<typename T , std::size_t N> |
T | chebyshevLength (const Vector< T, N > &vec) |
| Chebyshev length of a vector. More...
|
|
template<typename T , std::size_t N> |
T | manhattanDistance (const Vector< T, N > &lhs, const Vector< T, N > &rhs) |
| Manhattan distance between two vectors. More...
|
|
template<typename T , std::size_t N> |
T | squareDistance (const Vector< T, N > &lhs, const Vector< T, N > &rhs) |
| Square Euclidean distance between two vectors. More...
|
|
template<typename T , std::size_t N> |
T | euclideanDistance (const Vector< T, N > &lhs, const Vector< T, N > &rhs) |
| Euclidean distance between two vectors. More...
|
|
template<typename T , std::size_t N> |
T | chebyshevDistance (const Vector< T, N > &lhs, const Vector< T, N > &rhs) |
| Chebyshev distance between two vectors. More...
|
|
template<typename T , std::size_t N> |
Vector< T, N > | normalize (const Vector< T, N > &vec) |
| Normalize a vector. More...
|
|
template<typename T > |
Vector< T, 2 > | unit (T angle) |
| Unit vector in a specified direction. More...
|
|
template<typename T > |
constexpr Vector< T, 2 > | perp (const Vector< T, 2 > &vec) |
| Perpendicular vector. More...
|
|
template<typename T > |
constexpr Vector< T, 3 > | cross (const Vector< T, 3 > &lhs, const Vector< T, 3 > &rhs) |
| Cross product. More...
|
|