|
constexpr | vector2 (vector2 const &) noexcept=default |
|
constexpr | vector2 (vector2 &&) noexcept=default |
|
constexpr vector2 & | operator= (vector2 const &) noexcept=default |
|
constexpr vector2 & | operator= (vector2 &&) noexcept=default |
|
constexpr | operator array_type () const noexcept |
| Convert a vector to its array_type-nummeric_array.
|
|
constexpr | vector2 (array_type const &other) noexcept |
| Construct a vector from a array_type-simd.
|
|
constexpr | vector2 () noexcept |
| Construct a empty vector / zero length.
|
|
constexpr | vector2 (float x, float y) noexcept |
| Construct a 3D vector from x, y and z elements.
|
|
constexpr float & | x () noexcept |
| Access the x element from the vector.
|
|
constexpr float & | y () noexcept |
| Access the y element from the vector.
|
|
constexpr float | x () const noexcept |
| Access the x element from the vector.
|
|
constexpr float | y () const noexcept |
| Access the y element from the vector.
|
|
constexpr vector2 | operator- () const noexcept |
| Mirror this vector.
|
|
constexpr vector2 & | operator+= (vector2 const &rhs) noexcept |
|
constexpr vector2 & | operator-= (vector2 const &rhs) noexcept |
|
constexpr vector2 & | operator*= (float const &rhs) noexcept |
|
constexpr bool | holds_invariant () const noexcept |
| Check if the vector is valid.
|
|
|
constexpr friend vector2 | operator+ (vector2 const &lhs, vector2 const &rhs) noexcept |
| Add two vectors from each other.
|
|
constexpr friend vector2 | operator- (vector2 const &lhs, vector2 const &rhs) noexcept |
| Subtract two vectors from each other.
|
|
constexpr friend vector2 | operator* (vector2 const &lhs, float const &rhs) noexcept |
| Scale the vector by a scaler.
|
|
constexpr friend vector2 | operator* (float const &lhs, vector2 const &rhs) noexcept |
| Scale the vector by a scaler.
|
|
constexpr friend bool | operator== (vector2 const &lhs, vector2 const &rhs) noexcept |
| Compare if two vectors are equal.
|
|
constexpr friend float | squared_hypot (vector2 const &rhs) noexcept |
| Get the squared length of the vector.
|
|
float | hypot (vector2 const &rhs) noexcept |
| Get the length of the vector.
|
|
constexpr friend float | rcp_hypot (vector2 const &rhs) noexcept |
| Get the length of the vector.
|
|
constexpr friend vector2 | normalize (vector2 const &rhs) noexcept |
| Normalize a vector to a unit vector.
|
|
constexpr friend float | dot (vector2 const &lhs, vector2 const &rhs) noexcept |
| Get the dot product between two vectors.
|
|
constexpr friend float | det (vector2 const &lhs, vector2 const &rhs) noexcept |
| Get the determinate between two vectors.
|
|
constexpr friend vector2 | cross (vector2 const &rhs) noexcept |
| Get the cross product of one 2D vectors.
|
|
constexpr friend float | cross (vector2 const &lhs, vector2 const &rhs) noexcept |
| Get the cross product between two 2D vectors.
|
|
constexpr friend vector2 | normal (vector2 const &rhs) noexcept |
| Get the normal on a 2D vector.
|
|
constexpr vector2 | min (vector2 const &lhs, vector2 const &rhs) noexcept |
| Mix the two vectors and get the lowest value of each element.
|
|
constexpr vector2 | max (vector2 const &lhs, vector2 const &rhs) noexcept |
| Mix the two vectors and get the highest value of each element.
|
|
constexpr vector2 | round (vector2 const &rhs) noexcept |
| Round the elements of the vector toward nearest integer.
|
|
constexpr vector2 | ceil (vector2 const &rhs) noexcept |
| Round the elements of the vector toward upward and to the right.
|
|
constexpr vector2 | floor (vector2 const &rhs) noexcept |
| Round the elements of the vector toward downward and to the left.
|
|
std::string | to_string (vector2 const &rhs) noexcept |
|
std::ostream & | operator<< (std::ostream &lhs, vector2 const &rhs) noexcept |
|
A high-level geometric vector Part of the high-level vector, point, mat and color types.
A vector, for both 2D or 3D is internally represented as a 4D homogeneous vector. Which can be efficiently implemented as a __m128 SSE register.