|
constexpr | Vector4 () |
| Initializes a new Vector4 with all components to their default value.
|
|
constexpr | Vector4 (T value_x, T value_y, T value_z, T value_w) noexcept |
| Initializes a new Vector4 with components set to the given values.
|
|
constexpr | Vector4 (const Vector4 &other) |
|
constexpr | Vector4 (Vector4 &&other) noexcept |
|
constexpr Vector4 & | operator= (const Vector4 &other) |
|
constexpr Vector4 & | operator= (Vector4 &&other) noexcept |
|
template<typename To > |
constexpr Vector4< To > | castTo () const noexcept |
| Casts all components of the Vector4 to the type To.
|
|
constexpr | Vector (std::array< std::reference_wrapper< T >, N > values) |
| Initializes a new Vector.
|
|
constexpr bool | operator== (const Vector &other) const noexcept |
| Compares two Vector for equality.
|
|
constexpr bool | operator!= (const Vector &other) const noexcept |
| Compares two Vector for inequality.
|
|
constexpr Vector4< T > | operator+ (const Vector4< T > &other) const noexcept |
| Adds two Vector.
|
|
constexpr Vector4< T > | operator- (const Vector4< T > &other) const noexcept |
| Subtracts two Vector.
|
|
constexpr Vector4< T > | operator- () const noexcept |
| Negates all components of the current Vector.
|
|
constexpr Vector4< T > | operator* (const Vector4< T > &other) const noexcept |
| Multiplies two Vector.
|
|
constexpr Vector4< T > | operator* (const T &value) const noexcept |
| Multiplies a Vector by a value of type T.
|
|
constexpr Vector4< T > | operator/ (const Vector4< T > &other) const noexcept |
| Divides two Vector.
|
|
constexpr Vector4< T > | operator/ (const T &value) const noexcept |
| Divides a Vector by a value of type T.
|
|
constexpr Vector4< T > & | operator+= (const Vector &other) noexcept |
| Adds the value of other to the current vector.
|
|
constexpr Vector4< T > & | operator-= (const Vector &other) noexcept |
| Subtracts the value of other to the current vector.
|
|
constexpr Vector4< T > & | operator*= (const Vector &other) noexcept |
| Multiplies the value of other to the current vector.
|
|
constexpr Vector4< T > & | operator/= (const T &value) noexcept |
| Divides the value of other from the current vector.
|
|
constexpr T | norm () const noexcept |
| Computes the norm of the Vector. (||v|| = sqrt(v1^2 + v2^2 + ... + vn^2))
|
|
constexpr Vector4< T > | normalized () const noexcept |
| Gets the normalized Vector. (v / ||v||)
|
|
constexpr T | dot (const Vector4< T > &other) const noexcept |
| Computes the dot product between the current Vector and other .
|
|
template<typename T>
class spark::math::Vector4< T >
A vector with four components.
- Template Parameters
-
T | The type of the four components. |