|
| template<class Tt = T> |
| | Vector2D (const Vector< 2, Tt > &other) |
| | Construct a new Vector2D object from a Vector object. More...
|
| |
| T & | x () noexcept |
| | x component More...
|
| |
| const T & | x () const noexcept |
| | const x component More...
|
| |
| T & | y () noexcept |
| | y component More...
|
| |
| const T & | y () const noexcept |
| | const y component More...
|
| |
| template<class TScalar = T> |
| std::enable_if_t< std::is_arithmetic< TScalar >::value, void > | rotate (TScalar angle) |
| | rotates this Vector by an angle [rad] More...
|
| |
| template<class TScalar = T> |
| std::enable_if_t< std::is_arithmetic< TScalar >::value, Vector2D< T > > | rotated (TScalar angle) |
| | returns a Vector2D that is rotated by an angle [rad] More...
|
| |
| constexpr | Vector ()=default |
| | Construct a new Vector object. More...
|
| |
| | Vector (TArgs &&... args) |
| | Construct a new Vector object from a number of N values. More...
|
| |
| | Vector (const Vector< Nn, U > &v) |
| | Construct a new Vector from an existing Vector of a different type. More...
|
| |
| | Vector (const std::array< T, N > &a) |
| | Construct a new Vector object from an std::array. More...
|
| |
| | Vector (const std::array< U, N > &a) |
| | Construct a new Vector object from an std::array of a different type. More...
|
| |
| | Vector (const U &value) |
| | Construct a new Vector object from a single value. More...
|
| |
| | Vector (const Vector &other)=default |
| | Copy construct a new Vector object. More...
|
| |
| | Vector (Vector &&other) noexcept=default |
| | Move construct a new Vector object. More...
|
| |
|
| ~Vector ()=default |
| | Destroy the Vector object.
|
| |
| Vector & | operator= (const Vector &other)=default |
| | Copy assignment operator. More...
|
| |
| Vector & | operator= (Vector &&other) noexcept=default |
| | Move assignment operator. More...
|
| |
| T & | operator[] (size_type idx) noexcept |
| | access an element within the vector More...
|
| |
| const T & | operator[] (size_type idx) const noexcept |
| | const access an element within the vector More...
|
| |
| T & | at (size_type idx) |
| | access an element within the vector More...
|
| |
| const T & | at (size_type idx) const |
| | const access an element within the vector More...
|
| |
| constexpr size_type | size () const noexcept |
| | returns the size of the vector More...
|
| |
| iterator | begin () noexcept |
| | returns an iterator pointing to the first element More...
|
| |
| const_iterator | begin () const noexcept |
| | returns a const iterator pointing to the first element More...
|
| |
| iterator | end () noexcept |
| | returns an iterator pointing to the element following the last element More...
|
| |
| const_iterator | end () const noexcept |
| | returns a const iterator pointing to the element following the last element More...
|
| |
| T | min () const |
| | get the min value of the vector More...
|
| |
| T | max () const |
| | get the max value of the vector More...
|
| |
| T | sum () const |
| | sum up all the elements of the vector More...
|
| |
| U | mean () const |
| | mean of all the elements of the vector More...
|
| |
| std::conditional_t< std::is_same< U, void >::value, T, U > | dot (const Vector< N2, T2 > &rhs) const |
| | dot product of two vectors More...
|
| |
| std::conditional_t< std::is_same< U, void >::value, Vector< M2, T >, Vector< M2, U > > | dot (const Matrix< N2, M2, T2 > &rhs) const |
| | dot product of a vector and a matrix More...
|
| |
| U | std () const |
| | calculates the standard deviation More...
|
| |
| U | length () const |
| | euclidean vector length More...
|
| |
| void | normalize () |
| | normalizes this vector More...
|
| |
| Vector< N, T > | normalized () |
| | returns a normalized vector More...
|
| |
| void | flip () |
| | flips this vector, i.e. reverses its elements More...
|
| |
| Vector< N, T > | flipped () const |
| | returns a flipped vector More...
|
| |
| void | sort () |
| | sort vector elements in ascending order More...
|
| |
| void | sort (const Compare &comp) |
| | sort vector elements by providing a condition More...
|
| |
| Vector< N, T > | sorted () const |
| | returns a sorted vector More...
|
| |
| Vector< N, T > | sorted (const Compare &comp) const |
| |
| bool | operator== (const Vector< N, U > &rhs) const |
| | equality operator More...
|
| |
| bool | operator!= (const Vector< N, U > &rhs) const |
| | unequality operator More...
|
| |
| Vector< N, T > & | operator+= (const Vector< N, U > &rhs) |
| | plus equal operator More...
|
| |
| std::enable_if_t< std::is_arithmetic< TScalar >::value, Vector< N, T > &> | operator+= (const TScalar &scalar) |
| | add a scalar to this vector More...
|
| |
| Vector< N, T > & | operator-= (const Vector< N, U > &rhs) |
| | minus equal operator More...
|
| |
| std::enable_if_t< std::is_arithmetic< TScalar >::value, Vector< N, T > &> | operator-= (const TScalar &scalar) |
| | subtract a scalar from every element of this vector More...
|
| |
| Vector< N, T > & | operator*= (const Vector< N, U > &rhs) |
| | multiplication equal operator More...
|
| |
| std::enable_if_t< std::is_arithmetic< TScalar >::value, Vector< N, T > &> | operator*= (const TScalar &scalar) |
| | multiply a scalar with this vector More...
|
| |
| Vector< N, T > & | operator/= (const Vector< N, U > &rhs) |
| | divison equal operator More...
|
| |
| std::enable_if_t< std::is_arithmetic< TScalar >::value, Vector< N, T > &> | operator/= (const TScalar &scalar) |
| | divide every element of this vector by a scalar More...
|
| |
template<typename T>
class mu::Vector2D< T >
A two dimensional vector.
- Template Parameters
-