linalg::vec<T,M>
defines a fixed-length vector containing exactly M
elements of type T
.
More...
Classes | |
struct | vec< T, 1 > |
struct | vec< T, 2 > |
struct | vec< T, 3 > |
struct | vec< T, 4 > |
linalg::vec<T,M>
defines a fixed-length vector containing exactly M
elements of type T
.
This data structure can be used to store a wide variety of types of data, including geometric vectors, points, homogeneous coordinates, plane equations, colors, texture coordinates, or any other situation where you need to manipulate a small sequence of numbers. As such, vec<T,M>
is supported by a set of algebraic and component-wise functions, as well as a set of standard reductions.
vec<T,M>
:
DefaultConstructible
: M
elements of type T
: CopyConstructible
and CopyAssignable
: EqualityComparable
and LessThanComparable
: T
: vec<U,M>
of some other type U
: x,y,z,w
: +
, -
, !
and ~
in component-wise fashion: +
, -
, *
, /
, %
, |
, &
, ^
, <<
and >>
in component-wise fashion: +=
, -=
, *=
, /=
, %=
, |=
, &=
, ^=
, <<=
and >>=
with vectors or scalars on the right: