|
Tuesday
|
The vec class template and its associated utility structs and functions.
Classes | |
| struct | tue::is_vec_component< T > |
Checks if a type can be used as the component type of a vec. More... | |
| class | tue::vec< T, N > |
An N-dimensional vector. More... | |
Typedefs | |
| template<typename T > | |
| using | tue::vec2 = vec< T, 2 > |
| A 2-dimensional vector. More... | |
| template<typename T > | |
| using | tue::vec3 = vec< T, 3 > |
| A 3-dimensional vector. More... | |
| template<typename T > | |
| using | tue::vec4 = vec< T, 4 > |
| A 4-dimensional vector. More... | |
| using | tue::fvec2 = vec2< float > |
A 2-dimensional vector with float components. More... | |
| using | tue::fvec3 = vec3< float > |
A 3-dimensional vector with float components. More... | |
| using | tue::fvec4 = vec4< float > |
A 4-dimensional vector with float components. More... | |
| using | tue::dvec2 = vec2< double > |
A 2-dimensional vector with double components. More... | |
| using | tue::dvec3 = vec3< double > |
A 3-dimensional vector with double components. More... | |
| using | tue::dvec4 = vec4< double > |
A 4-dimensional vector with double components. More... | |
| using | tue::ivec2 = vec2< int > |
A 2-dimensional vector with int components. More... | |
| using | tue::ivec3 = vec3< int > |
A 3-dimensional vector with int components. More... | |
| using | tue::ivec4 = vec4< int > |
A 4-dimensional vector with int components. More... | |
| using | tue::uvec2 = vec2< unsigned int > |
A 2-dimensional vector with unsigned int components. More... | |
| using | tue::uvec3 = vec3< unsigned int > |
A 3-dimensional vector with unsigned int components. More... | |
| using | tue::uvec4 = vec4< unsigned int > |
A 4-dimensional vector with unsigned int components. More... | |
Functions | |
| template<typename T , int N> | |
| constexpr vec< decltype(+std::declval< T >)), N > | tue::operator+ (const vec< T, N > &v) noexcept |
Computes the unary plus of each component of v. More... | |
| template<typename T , int N> | |
| constexpr vec< decltype(-std::declval< T >)), N > | tue::operator- (const vec< T, N > &v) noexcept |
Computes the unary minus of each component of v. More... | |
| template<typename T , int N> | |
| constexpr vec< decltype(~std::declval< T >)), N > | tue::operator~ (const vec< T, N > &v) noexcept |
Computes the bitwise NOT of each component of v. More... | |
| template<typename T , typename U , int N> | |
| constexpr std::enable_if_t< is_vec_component< T >::value, vec< decltype(std::declval< T >)+std::declval< U >)), N > > | tue::operator+ (const T &lhs, const vec< U, N > &rhs) noexcept |
Computes the sums of lhs and each component of rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr std::enable_if_t< is_vec_component< U >::value, vec< decltype(std::declval< T >)+std::declval< U >)), N > > | tue::operator+ (const vec< T, N > &lhs, const U &rhs) noexcept |
Computes the sums of each component of lhs and rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr vec< decltype(std::declval< T >)+std::declval< U >)), N > | tue::operator+ (const vec< T, N > &lhs, const vec< U, N > &rhs) noexcept |
Computes the sums of each component of lhs and each corresponding component of rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr std::enable_if_t< is_vec_component< T >::value, vec< decltype(std::declval< T >)-std::declval< U >)), N > > | tue::operator- (const T &lhs, const vec< U, N > &rhs) noexcept |
Computes the differences between lhs and each component of rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr std::enable_if_t< is_vec_component< U >::value, vec< decltype(std::declval< T >)-std::declval< U >)), N > > | tue::operator- (const vec< T, N > &lhs, const U &rhs) noexcept |
Computes the differences between each component of lhs and rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr vec< decltype(std::declval< T >)-std::declval< U >)), N > | tue::operator- (const vec< T, N > &lhs, const vec< U, N > &rhs) noexcept |
Computes the differences between each component of lhs and each corresponding component of rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr std::enable_if_t< is_vec_component< T >::value, vec< decltype(std::declval< T >)*std::declval< U >)), N > > | tue::operator* (const T &lhs, const vec< U, N > &rhs) noexcept |
Computes the products of lhs and each component of rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr std::enable_if_t< is_vec_component< U >::value, vec< decltype(std::declval< T >)*std::declval< U >)), N > > | tue::operator* (const vec< T, N > &lhs, const U &rhs) noexcept |
Computes the products of each component of lhs and rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr vec< decltype(std::declval< T >)*std::declval< U >)), N > | tue::operator* (const vec< T, N > &lhs, const vec< U, N > &rhs) noexcept |
Computes the products of each component of lhs and each corresponding component of rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr std::enable_if_t< is_vec_component< T >::value, vec< decltype(std::declval< T >)/std::declval< U >)), N > > | tue::operator/ (const T &lhs, const vec< U, N > &rhs) noexcept |
Computes the quotients of lhs over each component of rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr std::enable_if_t< is_vec_component< U >::value, vec< decltype(std::declval< T >)/std::declval< U >)), N > > | tue::operator/ (const vec< T, N > &lhs, const U &rhs) noexcept |
Computes the quotients of each component of lhs over rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr vec< decltype(std::declval< T >)/std::declval< U >)), N > | tue::operator/ (const vec< T, N > &lhs, const vec< U, N > &rhs) noexcept |
Computes the quotients of each component of lhs over each corresponding component of rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr std::enable_if_t< is_vec_component< T >::value, vec< decltype(std::declval< T >)%std::declval< U >)), N > > | tue::operator% (const T &lhs, const vec< U, N > &rhs) noexcept |
Computes the modulos of lhs over each component of rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr std::enable_if_t< is_vec_component< U >::value, vec< decltype(std::declval< T >)%std::declval< U >)), N > > | tue::operator% (const vec< T, N > &lhs, const U &rhs) noexcept |
Computes the modulos of each component of lhs over rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr vec< decltype(std::declval< T >)%std::declval< U >)), N > | tue::operator% (const vec< T, N > &lhs, const vec< U, N > &rhs) noexcept |
Computes the modulos of each component of lhs over each corresponding component of rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr std::enable_if_t< is_vec_component< T >::value, vec< decltype(std::declval< T >)&std::declval< U >)), N > > | tue::operator& (const T &lhs, const vec< U, N > &rhs) noexcept |
Computes the bitwise AND of lhs and each component of rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr std::enable_if_t< is_vec_component< U >::value, vec< decltype(std::declval< T >)&std::declval< U >)), N > > | tue::operator& (const vec< T, N > &lhs, const U &rhs) noexcept |
Computes the bitwise AND of each component of lhs and rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr vec< decltype(std::declval< T >)&std::declval< U >)), N > | tue::operator& (const vec< T, N > &lhs, const vec< U, N > &rhs) noexcept |
Computes the bitwise AND of each component of lhs and each corresponding component of rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr std::enable_if_t< is_vec_component< T >::value, vec< decltype(std::declval< T >)|std::declval< U >)), N > > | tue::operator| (const T &lhs, const vec< U, N > &rhs) noexcept |
Computes the bitwise OR of lhs and each component of rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr std::enable_if_t< is_vec_component< U >::value, vec< decltype(std::declval< T >)|std::declval< U >)), N > > | tue::operator| (const vec< T, N > &lhs, const U &rhs) noexcept |
Computes the bitwise OR of each component of lhs and rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr vec< decltype(std::declval< T >)|std::declval< U >)), N > | tue::operator| (const vec< T, N > &lhs, const vec< U, N > &rhs) noexcept |
Computes the bitwise OR of each component of lhs and each corresponding component of rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr std::enable_if_t< is_vec_component< T >::value, vec< decltype(std::declval< T >)^std::declval< U >)), N > > | tue::operator^ (const T &lhs, const vec< U, N > &rhs) noexcept |
Computes the bitwise XOR of lhs and each component of rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr std::enable_if_t< is_vec_component< U >::value, vec< decltype(std::declval< T >)^std::declval< U >)), N > > | tue::operator^ (const vec< T, N > &lhs, const U &rhs) noexcept |
Computes the bitwise XOR of each component of lhs and rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr vec< decltype(std::declval< T >)^std::declval< U >)), N > | tue::operator^ (const vec< T, N > &lhs, const vec< U, N > &rhs) noexcept |
Computes the bitwise XOR of each component of lhs and each corresponding component of rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr std::enable_if_t< is_vec_component< T >::value, vec< decltype(std::declval< T >) shift_left std::declval< U >)), N > > | tue::operator<< (const T &lhs, const vec< U, N > &rhs) noexcept |
Computes the bitwise shifts left of lhs by each component of rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr std::enable_if_t< is_vec_component< U >::value, vec< decltype(std::declval< T >) shift_left std::declval< U >)), N > > | tue::operator<< (const vec< T, N > &lhs, const U &rhs) noexcept |
Computes the bitwise shifts left of each component of lhs by rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr vec< decltype(std::declval< T >) shift_left std::declval< U >)), N > | tue::operator<< (const vec< T, N > &lhs, const vec< U, N > &rhs) noexcept |
Computes the bitwise shifts left of each component of lhs by each corresponding component of rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr std::enable_if_t< is_vec_component< T >::value, vec< decltype(std::declval< T >) shift_right std::declval< U >)), N > > | tue::operator>> (const T &lhs, const vec< U, N > &rhs) noexcept |
Computes the bitwise shifts right of lhs by each component of rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr std::enable_if_t< is_vec_component< U >::value, vec< decltype(std::declval< T >) shift_right std::declval< U >)), N > > | tue::operator>> (const vec< T, N > &lhs, const U &rhs) noexcept |
Computes the bitwise shifts right of each component of lhs by rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr vec< decltype(std::declval< T >) shift_right std::declval< U >)), N > | tue::operator>> (const vec< T, N > &lhs, const vec< U, N > &rhs) noexcept |
Computes the bitwise shifts right of each component of lhs by each corresponding component of rhs. More... | |
| template<typename T , typename U , int N> | |
| constexpr bool | tue::operator== (const vec< T, N > &lhs, const vec< U, N > &rhs) noexcept |
Determines whether or not two vec's compare equal. More... | |
| template<typename T , typename U , int N> | |
| constexpr bool | tue::operator!= (const vec< T, N > &lhs, const vec< U, N > &rhs) noexcept |
Determines whether or not two vec's compare not equal. More... | |
| template<typename T , int N> | |
| vec< T, N > | tue::math::sin (const vec< T, N > &v) noexcept |
Computes tue::math::sin() for each component of v. More... | |
| template<typename T , int N> | |
| vec< T, N > | tue::math::cos (const vec< T, N > &v) noexcept |
Computes tue::math::cos() for each component of v. More... | |
| template<typename T , int N> | |
| void | tue::math::sincos (const vec< T, N > &v, vec< T, N > &sin_out, vec< T, N > &cos_out) noexcept |
Computes tue::math::sincos() for each component of v. More... | |
| template<typename T , int N> | |
| vec< T, N > | tue::math::exp (const vec< T, N > &v) noexcept |
Computes tue::math::exp() for each component of v. More... | |
| template<typename T , int N> | |
| vec< T, N > | tue::math::log (const vec< T, N > &v) noexcept |
Computes tue::math::log() for each component of v. More... | |
| template<typename T , int N> | |
| vec< T, N > | tue::math::abs (const vec< T, N > &v) noexcept |
Computes tue::math::abs() for each component of v. More... | |
| template<typename T , int N> | |
| vec< T, N > | tue::math::pow (const vec< T, N > &bases, const vec< T, N > &exponents) noexcept |
Computes tue::math::pow() for each component of bases and each corresponding component of exponents. More... | |
| template<typename T , int N> | |
| vec< T, N > | tue::math::recip (const vec< T, N > &v) noexcept |
Computes tue::math::recip() for each component of v. More... | |
| template<typename T , int N> | |
| vec< T, N > | tue::math::sqrt (const vec< T, N > &v) noexcept |
Computes tue::math::sqrt() for each component of v. More... | |
| template<typename T , int N> | |
| vec< T, N > | tue::math::rsqrt (const vec< T, N > &v) noexcept |
Computes tue::math::rsqrt() for each component of v. More... | |
| template<typename T , int N> | |
| vec< T, N > | tue::math::min (const vec< T, N > &v1, const vec< T, N > &v2) noexcept |
Computes tue::math::min() for each corresponding pair of components from v1 and v2. More... | |
| template<typename T , int N> | |
| vec< T, N > | tue::math::max (const vec< T, N > &v1, const vec< T, N > &v2) noexcept |
Computes tue::math::max() for each corresponding pair of components from v1 and v2. More... | |
| template<typename T , typename U , int N> | |
| vec< U, N > | tue::math::mask (const vec< T, N > &conditions, const vec< U, N > &values) noexcept |
Computes tue::math::mask() for each corresponding pair of components from conditions and values. More... | |
| template<typename T , typename U , int N> | |
| vec< U, N > | tue::math::select (const vec< T, N > &conditions, const vec< U, N > &values, const vec< U, N > &otherwise) noexcept |
Computes tue::math::select() for each corresponding trio of components from conditions, values, and otherwise. More... | |
| template<typename T , int N> | |
| vec< decltype(tue::math::less(std::declval< T >), std::declval< T >))), N > | tue::math::less (const vec< T, N > &lhs, const vec< T, N > &rhs) noexcept |
Computes tue::math::less() for each corresponding pair of components from lhs and rhs. More... | |
| template<typename T , int N> | |
| vec< decltype(tue::math::less_equal(std::declval< T >), std::declval< T >))), N > | tue::math::less_equal (const vec< T, N > &lhs, const vec< T, N > &rhs) noexcept |
Computes tue::math::less_equal() for each corresponding pair of components from lhs and rhs. More... | |
| template<typename T , int N> | |
| vec< decltype(tue::math::greater(std::declval< T >), std::declval< T >))), N > | tue::math::greater (const vec< T, N > &lhs, const vec< T, N > &rhs) noexcept |
Computes tue::math::greater() for each corresponding pair of components from lhs and rhs. More... | |
| template<typename T , int N> | |
| vec< decltype(tue::math::greater_equal(std::declval< T >), std::declval< T >))), N > | tue::math::greater_equal (const vec< T, N > &lhs, const vec< T, N > &rhs) noexcept |
Computes tue::math::greater_equal() for each corresponding pair of components from lhs and rhs. More... | |
| template<typename T , int N> | |
| vec< decltype(tue::math::equal(std::declval< T >), std::declval< T >))), N > | tue::math::equal (const vec< T, N > &lhs, const vec< T, N > &rhs) noexcept |
Computes tue::math::equal() for each corresponding pair of components from lhs and rhs. More... | |
| template<typename T , int N> | |
| vec< decltype(tue::math::not_equal(std::declval< T >), std::declval< T >))), N > | tue::math::not_equal (const vec< T, N > &lhs, const vec< T, N > &rhs) noexcept |
Computes tue::math::not_equal() for each corresponding pair of components from lhs and rhs. More... | |
| template<typename T , typename U , int N> | |
| decltype(std::declval< T >()*std::declval< U >()) constexpr | tue::math::dot (const vec< T, N > &lhs, const vec< U, N > &rhs) noexcept |
Computes the dot product of lhs and rhs. More... | |
| template<typename T , typename U > | |
| constexpr vec3< decltype(std::declval< T >)*std::declval< U >))> | tue::math::cross (const vec3< T > &lhs, const vec3< U > &rhs) noexcept |
Computes the cross product of lhs and rhs. More... | |
| template<typename T , int N> | |
| T | tue::math::length (const vec< T, N > &v) noexcept |
Computes the vector length of v. More... | |
| template<typename T , int N> | |
| constexpr T | tue::math::length2 (const vec< T, N > &v) noexcept |
Computes the vector length squared of v. More... | |
| template<typename T , int N> | |
| T | tue::math::rlength (const vec< T, N > &v) noexcept |
Computes the reciprocal of the vector length of v. More... | |
| template<typename T , int N> | |
| vec< T, N > | tue::math::normalize (const vec< T, N > &v) noexcept |
Computes a normalized copy of v. More... | |
| struct tue::is_vec_component |
Checks if a type can be used as the component type of a vec.
Extends std::integral_constant<bool, true> for the following types and std::integral_constant<bool, false> otherwise:
floatdoublestd::int8_tstd::int16_tstd::int32_tstd::int64_tstd::uint8_tstd::uint16_tstd::uint32_tstd::uint64_ttue::bool8tue::bool16tue::bool32tue::bool64tue::simd| T | The type to check. |
| class tue::vec |
An N-dimensional vector.
vec has the same size and alignment requirements as T[N].
| T | The component type. is_vec_component<T>value must be true. |
| N | The component count. Must be 2, 3, or 4. |
Public Types | |
| using | component_type = T |
This vec type's component type. More... | |
Static Public Attributes | |
| static constexpr int | component_count = N |
This vec type's component count. More... | |
Constructors, Conversions, and Factory Functions | |
| vec () noexcept=default | |
| Default constructs each component. More... | |
| constexpr | vec (const T &x) noexcept |
| Constructs each component with the same value. More... | |
| constexpr | vec (const T &x, const T &y) noexcept |
| Constructs each component with the value of the corresponding argument. More... | |
| constexpr | vec (const T &x, const T &y, const T &z) noexcept |
| Constructs each component with the value of the corresponding argument. More... | |
| constexpr | vec (const T &x, const T &y, const T &z, const T &w) noexcept |
| Constructs each component with the value of the corresponding argument. More... | |
| constexpr | vec (const vec2< T > &xy, const T &z) noexcept |
| Constructs each component with the value of the corresponding argument. More... | |
| constexpr | vec (const vec2< T > &xy, const T &z, const T &w) noexcept |
| Constructs each component with the value of the corresponding argument. More... | |
| constexpr | vec (const vec3< T > &xyz, const T &w) noexcept |
| Constructs each component with the value of the corresponding argument. More... | |
| template<int VN, typename = std::enable_if_t<(VN greater_than N)>> | |
| constexpr | vec (const vec< T, VN > &v) noexcept |
Truncates a larger vec with the same component type. More... | |
| template<typename U > | |
| constexpr | vec (const vec< U, N > &v) noexcept |
Explicitly casts another vec to a new component type. More... | |
| template<typename U > | |
| constexpr | operator vec< U, N > () const noexcept |
Implicitly casts this vec to a new component type. More... | |
| static constexpr vec< T, N > | zero () noexcept |
Returns a vec with each component set to 0. More... | |
| static constexpr vec< T, N > | x_axis () noexcept |
Returns a vec with the first component set to 1 and all other components set to 0. More... | |
| static constexpr vec< T, N > | y_axis () noexcept |
Returns a vec with the second component set to 1 and all other components set to 0. More... | |
| static constexpr vec< T, N > | z_axis () noexcept |
Returns a vec with the third component set to 1 and all other components set to 0. More... | |
| static constexpr vec< T, N > | w_axis () noexcept |
Returns a vec with the fourth component set to 1 and all other components set to 0. More... | |
Public Member Functions | |
| template<typename I > | |
| constexpr const T & | operator[] (const I &i) const noexcept |
| Returns a reference to the component at the given index. More... | |
| template<typename I > | |
| T & | operator[] (const I &i) noexcept |
| Returns a reference to the component at the given index. More... | |
| const T * | data () const noexcept |
Returns a pointer to this vec's underlying component array. More... | |
| T * | data () noexcept |
Returns a pointer to this vec's underlying component array. More... | |
| constexpr T | x () const noexcept |
Returns a copy of this vec's first component. More... | |
| constexpr T | y () const noexcept |
Returns a copy of this vec's second component. More... | |
| constexpr T | z () const noexcept |
Returns a copy of this vec's third component. More... | |
| constexpr T | w () const noexcept |
Returns a copy of this vec's fourth component. More... | |
| constexpr vec2< T > | xy () const noexcept |
Returns a copy of this vec's first two components. More... | |
| constexpr vec3< T > | xyz () const noexcept |
Returns a copy of this vec's first three components. More... | |
| constexpr vec4< T > | xyzw () const noexcept |
Returns a copy of this vec's first four components. More... | |
| void | set_x (const T &x) noexcept |
Sets this vec's first component. More... | |
| void | set_y (const T &y) noexcept |
Sets this vec's second component. More... | |
| void | set_z (const T &z) noexcept |
Sets this vec's third component. More... | |
| void | set_w (const T &w) noexcept |
Sets this vec's fourth component. More... | |
| void | set_xy (const T &x, const T &y) noexcept |
Sets this vec's first two components. More... | |
| void | set_xy (const vec2< T > &xy) noexcept |
Sets this vec's first two components. More... | |
| void | set_xyz (const T &x, const T &y, const T &z) noexcept |
Sets this vec's first three components. More... | |
| void | set_xyz (const vec2< T > &xy, const T &z) noexcept |
Sets this vec's first three components. More... | |
| void | set_xyz (const vec3< T > &xyz) noexcept |
Sets this vec's first three components. More... | |
| void | set_xyzw (const T &x, const T &y, const T &z, const T &w) noexcept |
Sets this vec's first four components. More... | |
| void | set_xyzw (const vec2< T > &xy, const T &z, const T &w) noexcept |
Sets this vec's first four components. More... | |
| void | set_xyzw (const vec3< T > &xyz, const T &w) noexcept |
Sets this vec's first four components. More... | |
| void | set_xyzw (const vec4< T > &xyzw) noexcept |
Sets this vec's first four components. More... | |
| constexpr T | r () const noexcept |
Returns a copy of this vec's first component. More... | |
| constexpr T | g () const noexcept |
Returns a copy of this vec's second component. More... | |
| constexpr T | b () const noexcept |
Returns a copy of this vec's third component. More... | |
| constexpr T | a () const noexcept |
Returns a copy of this vec's fourth component. More... | |
| constexpr vec2< T > | rg () const noexcept |
Returns a copy of this vec's first two components. More... | |
| constexpr vec3< T > | rgb () const noexcept |
Returns a copy of this vec's first three components. More... | |
| constexpr vec4< T > | rgba () const noexcept |
Returns a copy of this vec's first four components. More... | |
| void | set_r (const T &r) noexcept |
Sets this vec's first component. More... | |
| void | set_g (const T &g) noexcept |
Sets this vec's second component. More... | |
| void | set_b (const T &b) noexcept |
Sets this vec's third component. More... | |
| void | set_a (const T &a) noexcept |
Sets this vec's fourth component. More... | |
| void | set_rg (const T &r, const T &g) noexcept |
Sets this vec's first two components. More... | |
| void | set_rg (const vec2< T > &rg) noexcept |
Sets this vec's first two components. More... | |
| void | set_rgb (const T &r, const T &g, const T &b) noexcept |
Sets this vec's first three components. More... | |
| void | set_rgb (const vec2< T > &rg, const T &b) noexcept |
Sets this vec's first three components. More... | |
| void | set_rgb (const vec3< T > &rgb) noexcept |
Sets this vec's first three components. More... | |
| void | set_rgba (const T &r, const T &g, const T &b, const T &a) noexcept |
Sets this vec's first four components. More... | |
| void | set_rgba (const vec2< T > &rg, const T &b, const T &a) noexcept |
Sets this vec's first four components. More... | |
| void | set_rgba (const vec3< T > &rgb, const T &a) noexcept |
Sets this vec's first four components. More... | |
| void | set_rgba (const vec4< T > &rgba) noexcept |
Sets this vec's first four components. More... | |
| vec< T, N > & | operator++ () noexcept |
Pre-increments each component of this vec. More... | |
| vec< T, N > | operator++ (int) noexcept |
Post-increments each component of this vec. More... | |
| vec< T, N > & | operator-- () noexcept |
Pre-decrements each component of this vec. More... | |
| vec< T, N > | operator-- (int) noexcept |
Post-decrements each component of this vec. More... | |
| template<typename U > | |
| std::enable_if_t< is_vec_component< U >::value, vec< T, N > & > | operator+= (const U &x) noexcept |
Adds x to each component of this vec. More... | |
| template<typename U > | |
| vec< T, N > & | operator+= (const vec< U, N > &v) noexcept |
Adds each component of v to the corresponding component of this vec. More... | |
| template<typename U > | |
| std::enable_if_t< is_vec_component< U >::value, vec< T, N > & > | operator-= (const U &x) noexcept |
Subtracts x from each component of this vec. More... | |
| template<typename U > | |
| vec< T, N > & | operator-= (const vec< U, N > &v) noexcept |
Subtracts each component of v from the corresponding component of this vec. More... | |
| template<typename U > | |
| std::enable_if_t< is_vec_component< U >::value, vec< T, N > & > | operator*= (const U &x) noexcept |
Multiplies each component of this vec by x. More... | |
| template<typename U > | |
| vec< T, N > & | operator*= (const vec< U, N > &v) noexcept |
Multiplies each component of this vec by the corresponding component from v. More... | |
| template<typename U > | |
| vec< T, N > & | operator*= (const quat< U > &q) noexcept |
Rotates this vec by q. More... | |
| template<typename U > | |
| vec< T, N > & | operator*= (const mat< U, N, N > &m) noexcept |
Matrix multiplies this vec by m. More... | |
| template<typename U > | |
| std::enable_if_t< is_vec_component< U >::value, vec< T, N > & > | operator/= (const U &x) noexcept |
Divides each component of this vec by x. More... | |
| template<typename U > | |
| vec< T, N > & | operator/= (const vec< U, N > &v) noexcept |
Divides each component of this vec by the corresponding component from v. More... | |
| template<typename U > | |
| std::enable_if_t< is_vec_component< U >::value, vec< T, N > & > | operator%= (const U &x) noexcept |
Modulos each component of this vec by x. More... | |
| template<typename U > | |
| vec< T, N > & | operator%= (const vec< U, N > &v) noexcept |
Modulos each component of this vec by the corresponding component from v. More... | |
| template<typename U > | |
| std::enable_if_t< is_vec_component< U >::value, vec< T, N > & > | operator&= (const U &x) noexcept |
Bitwise ANDs each component of this vec with x. More... | |
| template<typename U > | |
| vec< T, N > & | operator&= (const vec< U, N > &v) noexcept |
Bitwise ANDs each component of this vec with the corresponding component from v. More... | |
| template<typename U > | |
| std::enable_if_t< is_vec_component< U >::value, vec< T, N > & > | operator|= (const U &x) noexcept |
Bitwise ORs each component of this vec with x. More... | |
| template<typename U > | |
| vec< T, N > & | operator|= (const vec< U, N > &v) noexcept |
Bitwise ORs each component of this vec with the corresponding component from v. More... | |
| template<typename U > | |
| std::enable_if_t< is_vec_component< U >::value, vec< T, N > & > | operator^= (const U &x) noexcept |
Bitwise XORs each component of this vec with x. More... | |
| template<typename U > | |
| vec< T, N > & | operator^= (const vec< U, N > &v) noexcept |
Bitwise XORs each component of this vec with the corresponding component from v. More... | |
| template<typename U > | |
| std::enable_if_t< is_vec_component< U >::value, vec< T, N > & > | operator<<= (const U &x) noexcept |
Bitwise shifts left each component of this vec by x. More... | |
| template<typename U > | |
| vec< T, N > & | operator<<= (const vec< U, N > &v) noexcept |
Bitwise shifts left each component of this vec by the corresponding component from v. More... | |
| template<typename U > | |
| std::enable_if_t< is_vec_component< U >::value, vec< T, N > & > | operator>>= (const U &x) noexcept |
Bitwise shifts right each component of this vec by x. More... | |
| template<typename U > | |
| vec< T, N > & | operator>>= (const vec< U, N > &v) noexcept |
Bitwise shifts right each component of this vec by the corresponding component from v. More... | |
| using tue::vec< T, N >::component_type = T |
This vec type's component type.
|
static |
This vec type's component count.
Default constructs each component.
Constructs each component with the same value.
| x | The value to construct each component with. |
|
inlinenoexcept |
Constructs each component with the value of the corresponding argument.
This overload is only available when N equals 2.
| x | The value to construct the first component with. |
| y | The value to construct the second component with. |
|
inlinenoexcept |
Constructs each component with the value of the corresponding argument.
This overload is only available when N equals 3.
| x | The value to construct the first component with. |
| y | The value to construct the second component with. |
| z | The value to construct the third component with. |
|
inlinenoexcept |
Constructs each component with the value of the corresponding argument.
This overload is only available when N equals 4.
| x | The value to construct the first component with. |
| y | The value to construct the second component with. |
| z | The value to construct the third component with. |
| w | The value to construct the fourth component with. |
|
inlinenoexcept |
Constructs each component with the value of the corresponding argument.
This overload is only available when N equals 3.
| xy | The values to construct the first two components with. |
| z | The value to construct the third component with. |
|
inlinenoexcept |
Constructs each component with the value of the corresponding argument.
This overload is only available when N equals 4.
| xy | The values to construct the first two components with. |
| z | The value to construct the third component with. |
| w | The value to construct the fourth component with. |
|
inlinenoexcept |
Constructs each component with the value of the corresponding argument.
This overload is only available when N equals 4.
| xyz | The values to construct the first three components with. |
| w | The value to construct the fourth component with. |
|
inlineexplicitnoexcept |
Truncates a larger vec with the same component type.
| VN | The component count of v. |
| v | The larger vec to truncate. |
|
inlineexplicitnoexcept |
Explicitly casts another vec to a new component type.
| U | The component type of v. |
| v | The vec to cast from. |
|
inlinenoexcept |
Implicitly casts this vec to a new component type.
| U | The new component type. |
vec with the new component type.
|
inlinestaticnoexcept |
Returns a vec with each component set to 0.
vec with each component set to 0.
|
inlinestaticnoexcept |
Returns a vec with the first component set to 1 and all other components set to 0.
vec with the first component set to 1 and all other components set to 0.
|
inlinestaticnoexcept |
Returns a vec with the second component set to 1 and all other components set to 0.
vec with the second component set to 1 and all other components set to 0.
|
inlinestaticnoexcept |
Returns a vec with the third component set to 1 and all other components set to 0.
This overload is only available when N is greater than or equal to 3.
vec with the third component set to 1 and all other components set to 0.
|
inlinestaticnoexcept |
Returns a vec with the fourth component set to 1 and all other components set to 0.
This overload is only available when N is greater than or equal to 4.
vec with the fourth component set to 1 and all other components set to 0.
|
inlinenoexcept |
Returns a reference to the component at the given index.
No bounds checking is performed.
| I | The index type. |
| i | The index. |
|
inlinenoexcept |
Returns a reference to the component at the given index.
No bounds checking is performed.
| I | The index type. |
| i | The index. |
|
inlinenoexcept |
Returns a pointer to this vec's underlying component array.
vec's underlying component array.
|
inlinenoexcept |
Returns a pointer to this vec's underlying component array.
vec's underlying component array.
|
inlinenoexcept |
Returns a copy of this vec's first component.
vec's first component.
|
inlinenoexcept |
Returns a copy of this vec's second component.
vec's second component.
|
inlinenoexcept |
Returns a copy of this vec's third component.
This overload is only available when N is greater than or equal to 3.
vec's third component.
|
inlinenoexcept |
Returns a copy of this vec's fourth component.
This overload is only available when N is greater than or equal to 4.
vec's fourth component. Returns a copy of this vec's first two components.
vec's first two components. Returns a copy of this vec's first three components.
This overload is only available when N is greater than or equal to 3.
vec's first three components. Returns a copy of this vec's first four components.
This overload is only available when N is greater than or equal to 4.
vec's first four components.
|
inlinenoexcept |
Sets this vec's first component.
| x | The new value for the first component. |
|
inlinenoexcept |
Sets this vec's second component.
| y | The new value for the second component. |
|
inlinenoexcept |
Sets this vec's third component.
This overload is only available when N is greater than or equal to 3.
| z | The new value for the third component. |
|
inlinenoexcept |
Sets this vec's fourth component.
This overload is only available when N is greater than or equal to 4.
| w | The new value for the fourth component. |
|
inlinenoexcept |
Sets this vec's first two components.
| x | The new value for the first component. |
| y | The new value for the second component. |
Sets this vec's first two components.
| xy | The new values for the first two components. |
|
inlinenoexcept |
Sets this vec's first three components.
This overload is only available when N is greater than or equal to 3.
| x | The new value for the first component. |
| y | The new value for the second component. |
| z | The new value for the third component. |
|
inlinenoexcept |
Sets this vec's first three components.
This overload is only available when N is greater than or equal to 3.
| xy | The new values for the first two components. |
| z | The new value for the third component. |
Sets this vec's first three components.
This overload is only available when N is greater than or equal to 3.
| xyz | The new values for the first three components. |
|
inlinenoexcept |
Sets this vec's first four components.
This overload is only available when N is greater than or equal to 4.
| x | The new value for the first component. |
| y | The new value for the second component. |
| z | The new value for the third component. |
| w | The new value for the fourth component. |
|
inlinenoexcept |
Sets this vec's first four components.
This overload is only available when N is greater than or equal to 4.
| xy | The new values for the first two components. |
| z | The new value for the third component. |
| w | The new value for the fourth component. |
|
inlinenoexcept |
Sets this vec's first four components.
This overload is only available when N is greater than or equal to 4.
| xyz | The new values for the first three components. |
| w | The new value for the fourth component. |
|
inlinenoexcept |
Sets this vec's first four components.
This overload is only available when N is greater than or equal to 4.
| xyzw | The new values for the first four components. |
|
inlinenoexcept |
Returns a copy of this vec's first component.
vec's first component.
|
inlinenoexcept |
Returns a copy of this vec's second component.
vec's second component.
|
inlinenoexcept |
Returns a copy of this vec's third component.
This overload is only available when N is greater than or equal to 3.
vec's third component.
|
inlinenoexcept |
Returns a copy of this vec's fourth component.
This overload is only available when N is greater than or equal to 4.
vec's fourth component. Returns a copy of this vec's first two components.
vec's first two components. Returns a copy of this vec's first three components.
This overload is only available when N is greater than or equal to 3.
vec's first three components. Returns a copy of this vec's first four components.
This overload is only available when N is greater than or equal to 4.
vec's first four components.
|
inlinenoexcept |
Sets this vec's first component.
| r | The new value for the first component. |
|
inlinenoexcept |
Sets this vec's second component.
| g | The new value for the second component. |
|
inlinenoexcept |
Sets this vec's third component.
This overload is only available when N is greater than or equal to 3.
| b | The new value for the third component. |
|
inlinenoexcept |
Sets this vec's fourth component.
This overload is only available when N is greater than or equal to 4.
| a | The new value for the fourth component. |
|
inlinenoexcept |
Sets this vec's first two components.
| r | The new value for the first component. |
| g | The new value for the second component. |
Sets this vec's first two components.
| rg | The new values for the first two components. |
|
inlinenoexcept |
Sets this vec's first three components.
This overload is only available when N is greater than or equal to 3.
| r | The new value for the first component. |
| g | The new value for the second component. |
| b | The new value for the third component. |
|
inlinenoexcept |
Sets this vec's first three components.
This overload is only available when N is greater than or equal to 3.
| rg | The new values for the first two components. |
| b | The new value for the third component. |
Sets this vec's first three components.
This overload is only available when N is greater than or equal to 3.
| rgb | The new values for the first three components. |
|
inlinenoexcept |
Sets this vec's first four components.
This overload is only available when N is greater than or equal to 4.
| r | The new value for the first component. |
| g | The new value for the second component. |
| b | The new value for the third component. |
| a | The new value for the fourth component. |
|
inlinenoexcept |
Sets this vec's first four components.
This overload is only available when N is greater than or equal to 4.
| rg | The new values for the first two components. |
| b | The new value for the third component. |
| a | The new value for the fourth component. |
|
inlinenoexcept |
Sets this vec's first four components.
This overload is only available when N is greater than or equal to 4.
| rgb | The new values for the first three components. |
| a | The new value for the fourth component. |
|
inlinenoexcept |
Sets this vec's first four components.
This overload is only available when N is greater than or equal to 4.
| rgba | The new values for the first four components. |
Pre-increments each component of this vec.
vec. Post-increments each component of this vec.
vec before being incremented. Pre-decrements each component of this vec.
vec. Post-decrements each component of this vec.
vec before being decremented.
|
inlinenoexcept |
Adds x to each component of this vec.
| U | The type of parameter x. |
| x | The value to add to each component of this vec. |
vec.
|
inlinenoexcept |
Adds each component of v to the corresponding component of this vec.
| U | The component type of v. |
| v | The values to add to each component of this vec. |
vec.
|
inlinenoexcept |
Subtracts x from each component of this vec.
| U | The type of parameter x. |
| x | The value to subtract from each component of this vec. |
vec.
|
inlinenoexcept |
Subtracts each component of v from the corresponding component of this vec.
| U | The component type of v. |
| v | The values to subtract from each component of this vec. |
vec.
|
inlinenoexcept |
Multiplies each component of this vec by x.
| U | The type of parameter x. |
| x | The value to multiply each component of this vec by. |
vec.
|
inlinenoexcept |
Multiplies each component of this vec by the corresponding component from v.
| U | The component type of v. |
| v | The values to multiply each component of this vec by. |
vec.
|
inlinenoexcept |
Rotates this vec by q.
This overload is only available when N is equal to 3. The operand order might be the opposite of what you expect from other libraries. This library generally prefers compound transformations be written from left-to-right instead of right-to-left.
| U | The component type of q. |
| q | A rotation quat. |
vec.
|
inlinenoexcept |
Matrix multiplies this vec by m.
This vec is treated as a matrix with a single row.
| U | The component type of m. |
| m | A mat. |
vec.
|
inlinenoexcept |
Divides each component of this vec by x.
| U | The type of parameter x. |
| x | The value to divide each component of this vec by. |
vec.
|
inlinenoexcept |
Divides each component of this vec by the corresponding component from v.
| U | The component type of v. |
| v | The values to divide each component of this vec by. |
vec.
|
inlinenoexcept |
Modulos each component of this vec by x.
| U | The type of parameter x. |
| x | The value to modulo each component of this vec by. |
vec.
|
inlinenoexcept |
Modulos each component of this vec by the corresponding component from v.
| U | The component type of v. |
| v | The values to modulo each component of this vec by. |
vec.
|
inlinenoexcept |
Bitwise ANDs each component of this vec with x.
| U | The type of parameter x. |
| x | The value to bitwise AND each component of this vec with. |
vec.
|
inlinenoexcept |
Bitwise ANDs each component of this vec with the corresponding component from v.
| U | The component type of v. |
| v | The values to bitwise AND each component of this vec with. |
vec.
|
inlinenoexcept |
Bitwise ORs each component of this vec with x.
| U | The type of parameter x. |
| x | The value to bitwise OR each component of this vec with. |
vec.
|
inlinenoexcept |
Bitwise ORs each component of this vec with the corresponding component from v.
| U | The component type of v. |
| v | The values to bitwise OR each component of this vec with. |
vec.
|
inlinenoexcept |
Bitwise XORs each component of this vec with x.
| U | The type of parameter x. |
| x | The value to bitwise XOR each component of this vec with. |
vec.
|
inlinenoexcept |
Bitwise XORs each component of this vec with the corresponding component from v.
| U | The component type of v. |
| v | The values to bitwise XOR each component of this vec with. |
vec.
|
inlinenoexcept |
Bitwise shifts left each component of this vec by x.
| U | The type of parameter x. |
| x | The value to bitwise shift left each component of this vec by. |
vec.
|
inlinenoexcept |
Bitwise shifts left each component of this vec by the corresponding component from v.
| U | The component type of v. |
| v | The values to bitwise shift left each component of this vec by. |
vec.
|
inlinenoexcept |
Bitwise shifts right each component of this vec by x.
| U | The type of parameter x. |
| x | The value to bitwise shift right each component of this vec by. |
vec.
|
inlinenoexcept |
Bitwise shifts right each component of this vec by the corresponding component from v.
| U | The component type of v. |
| v | The values to bitwise shift right each component of this vec by. |
vec. | using tue::vec2 = typedef vec<T, 2> |
A 2-dimensional vector.
| T | The component type. |
| using tue::vec3 = typedef vec<T, 3> |
A 3-dimensional vector.
| T | The component type. |
| using tue::vec4 = typedef vec<T, 4> |
A 4-dimensional vector.
| T | The component type. |
| using tue::fvec2 = typedef vec2<float> |
A 2-dimensional vector with float components.
| using tue::fvec3 = typedef vec3<float> |
A 3-dimensional vector with float components.
| using tue::fvec4 = typedef vec4<float> |
A 4-dimensional vector with float components.
| using tue::dvec2 = typedef vec2<double> |
A 2-dimensional vector with double components.
| using tue::dvec3 = typedef vec3<double> |
A 3-dimensional vector with double components.
| using tue::dvec4 = typedef vec4<double> |
A 4-dimensional vector with double components.
| using tue::ivec2 = typedef vec2<int> |
A 2-dimensional vector with int components.
| using tue::ivec3 = typedef vec3<int> |
A 3-dimensional vector with int components.
| using tue::ivec4 = typedef vec4<int> |
A 4-dimensional vector with int components.
| using tue::uvec2 = typedef vec2<unsigned int> |
A 2-dimensional vector with unsigned int components.
| using tue::uvec3 = typedef vec3<unsigned int> |
A 3-dimensional vector with unsigned int components.
| using tue::uvec4 = typedef vec4<unsigned int> |
A 4-dimensional vector with unsigned int components.
|
inlinenoexcept |
Computes the unary plus of each component of v.
| T | The component type of v. |
| N | The component count of v. |
| v | A vec. |
v.
|
inlinenoexcept |
Computes the unary minus of each component of v.
| T | The component type of v. |
| N | The component count of v. |
| v | A vec. |
v.
|
inlinenoexcept |
Computes the bitwise NOT of each component of v.
| T | The component type of v. |
| N | The component count of v. |
| v | A vec. |
v.
|
inlinenoexcept |
Computes the sums of lhs and each component of rhs.
| T | The type of parameter lhs. |
| U | The component type of rhs. |
| N | The component count of rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs and each component of rhs.
|
inlinenoexcept |
Computes the sums of each component of lhs and rhs.
| T | The component type of lhs. |
| U | The type of parameter rhs. |
| N | The component count of lhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs and rhs.
|
inlinenoexcept |
Computes the sums of each component of lhs and each corresponding component of rhs.
| T | The component type of lhs. |
| U | The component type of rhs. |
| N | The component count of both lhs and rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs and each corresponding component of rhs.
|
inlinenoexcept |
Computes the differences between lhs and each component of rhs.
| T | The type of parameter lhs. |
| U | The component type of rhs. |
| N | The component count of rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs and each component of rhs.
|
inlinenoexcept |
Computes the differences between each component of lhs and rhs.
| T | The component type of lhs. |
| U | The type of parameter rhs. |
| N | The component count of lhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs and rhs.
|
inlinenoexcept |
Computes the differences between each component of lhs and each corresponding component of rhs.
| T | The component type of lhs. |
| U | The component type of rhs. |
| N | The component count of both lhs and rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs and each corresponding component of rhs.
|
inlinenoexcept |
Computes the products of lhs and each component of rhs.
| T | The type of parameter lhs. |
| U | The component type of rhs. |
| N | The component count of rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs and each component of rhs.
|
inlinenoexcept |
Computes the products of each component of lhs and rhs.
| T | The component type of lhs. |
| U | The type of parameter rhs. |
| N | The component count of lhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs and rhs.
|
inlinenoexcept |
Computes the products of each component of lhs and each corresponding component of rhs.
| T | The component type of lhs. |
| U | The component type of rhs. |
| N | The component count of both lhs and rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs and each corresponding component of rhs.
|
inlinenoexcept |
Computes the quotients of lhs over each component of rhs.
| T | The type of parameter lhs. |
| U | The component type of rhs. |
| N | The component count of rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs over each component of rhs.
|
inlinenoexcept |
Computes the quotients of each component of lhs over rhs.
| T | The component type of lhs. |
| U | The type of parameter rhs. |
| N | The component count of lhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs over rhs.
|
inlinenoexcept |
Computes the quotients of each component of lhs over each corresponding component of rhs.
| T | The component type of lhs. |
| U | The component type of rhs. |
| N | The component count of both lhs and rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs over each corresponding component of rhs.
|
inlinenoexcept |
Computes the modulos of lhs over each component of rhs.
| T | The type of parameter lhs. |
| U | The component type of rhs. |
| N | The component count of rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs over each component of rhs.
|
inlinenoexcept |
Computes the modulos of each component of lhs over rhs.
| T | The component type of lhs. |
| U | The type of parameter rhs. |
| N | The component count of lhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs over rhs.
|
inlinenoexcept |
Computes the modulos of each component of lhs over each corresponding component of rhs.
| T | The component type of lhs. |
| U | The component type of rhs. |
| N | The component count of both lhs and rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs over each corresponding component of rhs.
|
inlinenoexcept |
Computes the bitwise AND of lhs and each component of rhs.
| T | The type of parameter lhs. |
| U | The component type of rhs. |
| N | The component count of rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs and each component of rhs.
|
inlinenoexcept |
Computes the bitwise AND of each component of lhs and rhs.
| T | The component type of lhs. |
| U | The type of parameter rhs. |
| N | The component count of lhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs and rhs.
|
inlinenoexcept |
Computes the bitwise AND of each component of lhs and each corresponding component of rhs.
| T | The component type of lhs. |
| U | The component type of rhs. |
| N | The component count of both lhs and rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs and each corresponding component of rhs.
|
inlinenoexcept |
Computes the bitwise OR of lhs and each component of rhs.
| T | The type of parameter lhs. |
| U | The component type of rhs. |
| N | The component count of rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs and each component of rhs.
|
inlinenoexcept |
Computes the bitwise OR of each component of lhs and rhs.
| T | The component type of lhs. |
| U | The type of parameter rhs. |
| N | The component count of lhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs and rhs.
|
inlinenoexcept |
Computes the bitwise OR of each component of lhs and each corresponding component of rhs.
| T | The component type of lhs. |
| U | The component type of rhs. |
| N | The component count of both lhs and rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs and each corresponding component of rhs.
|
inlinenoexcept |
Computes the bitwise XOR of lhs and each component of rhs.
| T | The type of parameter lhs. |
| U | The component type of rhs. |
| N | The component count of rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs and each component of rhs.
|
inlinenoexcept |
Computes the bitwise XOR of each component of lhs and rhs.
| T | The component type of lhs. |
| U | The type of parameter rhs. |
| N | The component count of lhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs and rhs.
|
inlinenoexcept |
Computes the bitwise XOR of each component of lhs and each corresponding component of rhs.
| T | The component type of lhs. |
| U | The component type of rhs. |
| N | The component count of both lhs and rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs and each corresponding component of rhs.
|
inlinenoexcept |
Computes the bitwise shifts left of lhs by each component of rhs.
| T | The type of parameter lhs. |
| U | The component type of rhs. |
| N | The component count of rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs by each component of rhs.
|
inlinenoexcept |
Computes the bitwise shifts left of each component of lhs by rhs.
| T | The component type of lhs. |
| U | The type of parameter rhs. |
| N | The component count of lhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs by rhs.
|
inlinenoexcept |
Computes the bitwise shifts left of each component of lhs by each corresponding component of rhs.
| T | The component type of lhs. |
| U | The component type of rhs. |
| N | The component count of both lhs and rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs by each corresponding component of rhs.
|
inlinenoexcept |
Computes the bitwise shifts right of lhs by each component of rhs.
| T | The type of parameter lhs. |
| U | The component type of rhs. |
| N | The component count of rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs by each component of rhs.
|
inlinenoexcept |
Computes the bitwise shifts right of each component of lhs by rhs.
| T | The component type of lhs. |
| U | The type of parameter rhs. |
| N | The component count of lhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs by rhs.
|
inlinenoexcept |
Computes the bitwise shifts right of each component of lhs by each corresponding component of rhs.
| T | The component type of lhs. |
| U | The component type of rhs. |
| N | The component count of both lhs and rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs by each corresponding component of rhs.
|
inlinenoexcept |
Determines whether or not two vec's compare equal.
| T | The component type of lhs. |
| U | The component type of rhs. |
| N | The component count of both lhs and rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
true if all the corresponding pairs of components compare equal and false otherwise.
|
inlinenoexcept |
Determines whether or not two vec's compare not equal.
| T | The component type of lhs. |
| U | The component type of rhs. |
| N | The component count of both lhs and rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
true if at least one of the corresponding pairs of components compares not equal and false otherwise.
|
inlinenoexcept |
Computes tue::math::sin() for each component of v.
| T | The component type of v. |
| N | The component count of v. |
| v | A vec. |
tue::math::sin() for each component of v.
|
inlinenoexcept |
Computes tue::math::cos() for each component of v.
| T | The component type of v. |
| N | The component count of v. |
| v | A vec. |
tue::math::cos() for each component of v.
|
inlinenoexcept |
Computes tue::math::sincos() for each component of v.
| T | The component type of v. |
| N | The component count of v. |
| v | A vec. |
| sin_out | A reference to the vec to store the sin() results in. |
| cos_out | A reference to the vec to store the cos() results in. |
|
inlinenoexcept |
Computes tue::math::exp() for each component of v.
| T | The component type of v. |
| N | The component count of v. |
| v | A vec. |
tue::math::exp() for each component of v.
|
inlinenoexcept |
Computes tue::math::log() for each component of v.
| T | The component type of v. |
| N | The component count of v. |
| v | A vec. |
tue::math::log() for each component of v.
|
inlinenoexcept |
Computes tue::math::abs() for each component of v.
| T | The component type of v. |
| N | The component count of v. |
| v | A vec. |
tue::math::abs() for each component of v.
|
inlinenoexcept |
Computes tue::math::pow() for each component of bases and each corresponding component of exponents.
| T | The component type of both bases and exponents. |
| N | The component count of both bases and exponents. |
| bases | The bases. |
| exponents | The exponents. |
tue::math::pow() for each component of bases and each corresponding component of exponents.
|
inlinenoexcept |
Computes tue::math::recip() for each component of v.
| T | The component type of v. |
| N | The component count of v. |
| v | A vec. |
tue::math::recip() for each component of v.
|
inlinenoexcept |
Computes tue::math::sqrt() for each component of v.
| T | The component type of v. |
| N | The component count of v. |
| v | A vec. |
tue::math::sqrt() for each component of v.
|
inlinenoexcept |
Computes tue::math::rsqrt() for each component of v.
| T | The component type of v. |
| N | The component count of v. |
| v | A vec. |
tue::math::rsqrt() for each component of v.
|
inlinenoexcept |
Computes tue::math::min() for each corresponding pair of components from v1 and v2.
| T | The component type of both v1 and v2. |
| N | The component count of both v1 and v2. |
| v1 | A vec. |
| v2 | Another vec. |
tue::math::min() for each corresponding pair of components from v1 and v2.
|
inlinenoexcept |
Computes tue::math::max() for each corresponding pair of components from v1 and v2.
| T | The component type of both v1 and v2. |
| N | The component count of both v1 and v2. |
| v1 | A vec. |
| v2 | Another vec. |
tue::math::max() for each corresponding pair of components from v1 and v2.
|
inlinenoexcept |
Computes tue::math::mask() for each corresponding pair of components from conditions and values.
| T | The component type of conditions. |
| U | The component type of values. |
| N | The component count of both conditions and values. |
| conditions | A vec. |
| values | Another vec. |
tue::math::mask() for each corresponding pair of components from conditions and values.
|
inlinenoexcept |
Computes tue::math::select() for each corresponding trio of components from conditions, values, and otherwise.
| T | The component type of conditions. |
| U | The component type of both values and otherwise. |
| N | The component count of all three parameters. |
| conditions | A vec. |
| values | Another vec. |
| otherwise | Another vec. |
tue::math::select() for each corresponding trio of components from conditions, values, and otherwise.
|
inlinenoexcept |
Computes tue::math::less() for each corresponding pair of components from lhs and rhs.
| T | The component type of both lhs and rhs. |
| N | The component count of both lhs and rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
tue::math::less() for each corresponding pair of components from lhs and rhs.
|
inlinenoexcept |
Computes tue::math::less_equal() for each corresponding pair of components from lhs and rhs.
| T | The component type of both lhs and rhs. |
| N | The component count of both lhs and rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
tue::math::less_equal() for each corresponding pair of components from lhs and rhs.
|
inlinenoexcept |
Computes tue::math::greater() for each corresponding pair of components from lhs and rhs.
| T | The component type of both lhs and rhs. |
| N | The component count of both lhs and rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
tue::math::greater() for each corresponding pair of components from lhs and rhs.
|
inlinenoexcept |
Computes tue::math::greater_equal() for each corresponding pair of components from lhs and rhs.
| T | The component type of both lhs and rhs. |
| N | The component count of both lhs and rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
tue::math::greater_equal() for each corresponding pair of components from lhs and rhs.
|
inlinenoexcept |
Computes tue::math::equal() for each corresponding pair of components from lhs and rhs.
| T | The component type of both lhs and rhs. |
| N | The component count of both lhs and rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
tue::math::equal() for each corresponding pair of components from lhs and rhs.
|
inlinenoexcept |
Computes tue::math::not_equal() for each corresponding pair of components from lhs and rhs.
| T | The component type of both lhs and rhs. |
| N | The component count of both lhs and rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
tue::math::not_equal() for each corresponding pair of components from lhs and rhs.
|
inlinenoexcept |
Computes the dot product of lhs and rhs.
| T | The component type of lhs. |
| U | The component type of rhs. |
| N | The component count of both lhs and rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs and rhs.
|
inlinenoexcept |
Computes the cross product of lhs and rhs.
| T | The component type of lhs. |
| U | The component type of rhs. |
| lhs | The left-hand side operand. |
| rhs | The right-hand side operand. |
lhs and rhs.
|
inlinenoexcept |
Computes the vector length of v.
| T | The component type of v. |
| N | The component count of v. |
| v | A vec. |
v.
|
inlinenoexcept |
Computes the vector length squared of v.
| T | The component type of v. |
| N | The component count of v. |
| v | A vec. |
v.
|
inlinenoexcept |
Computes the reciprocal of the vector length of v.
If the vector length of v equals 0, behavior is undefined.
| T | The component type of v. |
| N | The component count of v. |
| v | A vec. |
v.
|
inlinenoexcept |
Computes a normalized copy of v.
If the vector length of v equals 0, behavior is undefined.
| T | The component type of v. |
| N | The component count of v. |
| v | A vec. |
v.
1.8.10