|
| constexpr | vec ()=default |
| | Default constructor.
|
| |
| template<Primitive U> |
| constexpr | vec (U value) |
| | Constructor initializing all elements to the given value.
|
| |
| template<typename... U> |
| constexpr | vec (U... data) |
| | Variadic constructor.
|
| |
| constexpr | vec (std::array< T, size > const &arr) |
| | Constructor from std::array.
|
| |
| constexpr | vec (std::array< T, size > &&arr) |
| | Move constructor from std::array.
|
| |
| constexpr void | reset () noexcept |
| | Resets the vector to the zero vector.
|
| |
| template<typename U > |
| constexpr vec< size, T > & | operator= (vec< size, U > const &b) |
| | Overloaded assignment operator.
|
| |
| template<Primitive U> |
| constexpr vec< L, T > & | operator+= (U const value) noexcept |
| |
| template<Primitive U> |
| constexpr vec< L, T > & | operator-= (U const value) noexcept |
| |
| template<Primitive U> |
| constexpr vec< L, T > & | operator*= (U const value) noexcept |
| |
| template<Primitive U> |
| constexpr vec< L, T > & | operator/= (U const value) noexcept |
| |
| template<Primitive U> |
| constexpr vec< L, T > & | operator%= (U const value) noexcept |
| |
template<AnyVec U>
requires (size == U::size) |
| constexpr vec< L, T > & | operator+= (U const &other) noexcept |
| |
template<AnyVec U>
requires (size == U::size) |
| constexpr vec< L, T > & | operator-= (U const &other) noexcept |
| |
template<AnyVec U>
requires (size == U::size) |
| constexpr vec< L, T > & | operator*= (U const &other) noexcept |
| |
template<AnyVec U>
requires (size == U::size) |
| constexpr vec< L, T > & | operator/= (U const &other) noexcept |
| |
template<AnyVec U>
requires (size == U::size) |
| constexpr vec< L, T > & | operator%= (U const &other) noexcept |
| |
| constexpr T & | operator[] (size_t i) |
| | Overloaded subscript operator for non-const rvec.
|
| |
| constexpr T const & | operator[] (size_t i) const |
| | Overloaded subscript operator for const rvec.
|
| |
|
| template<Primitive U> |
| constexpr void | unpack_data (size_t offset, U u) |
| | Unpacks a single primitive value into the vector data.
|
| |
| template<class V > |
| constexpr void | unpack_data (size_t offset, V vec) |
| | Unpacks a vector into the matrix data.
|
| |
| template<typename A , typename B , typename... C> |
| constexpr void | unpack_data (size_t offset, A a, B b, C... c) |
| | Recursively unpacks multiple values into the vector data.
|
| |
template<size_t L, Primitive T>
struct mal_math::vec< L, T >
Definition of the mathematical vector with fixed size L and type T
Represents a generic vector of a given primitive type.
- Template Parameters
-
| L | Length of the vector. |
| T | The primitive type of the vector. |
Definition at line 21 of file vecn.hpp.
template<size_t L, Primitive T>
template<typename A , typename B , typename... C>
Determines the size of a parameter pack for a mixed set of types.
- Returns
- size_t Returns the cumulative size of the parameter pack types.
Definition at line 158 of file vecn.inl.
template<size_t L, Primitive T>
template<typename A , typename B , typename... C>
| void mal_math::vec< L, T >::unpack_data |
( |
size_t | offset, |
|
|
A | a, |
|
|
B | b, |
|
|
C... | c ) |
|
inlineconstexprprivate |
Recursively unpacks multiple values into the vector data.
- Parameters
-
| offset | The position to start unpacking in the vector data. |
| first | The first value to unpack. |
| second | The second value to unpack. |
| rest | The remaining values to unpack. |
Definition at line 161 of file vecn.hpp.