#include <nCine/Primitives/Vector2.h>
template<class T>
Vector2 class
Two-component vector.
Public static variables
Public static functions
Constructors, destructors, conversion operators
Public functions
- auto operator=(const Vector2& other) -> Vector2& noexcept
- auto operator=(Vector2&& other) -> Vector2& noexcept
- void Set(T x, T y)
- auto Data() -> T*
- auto Data() const -> const T*
-
auto operator[](std::
size_t index) -> T& -
auto operator[](std::
size_t index) const -> const T& - auto operator==(const Vector2& v) const -> bool
- auto operator!=(const Vector2& v) const -> bool
- auto operator-() const -> Vector2
- auto operator+=(const Vector2& v) -> Vector2&
- auto operator-=(const Vector2& v) -> Vector2&
- auto operator*=(const Vector2& v) -> Vector2&
- auto operator/=(const Vector2& v) -> Vector2&
- auto operator+=(T s) -> Vector2&
- auto operator-=(T s) -> Vector2&
- auto operator*=(T s) -> Vector2&
- auto operator/=(T s) -> Vector2&
- auto operator+(const Vector2& v) const -> Vector2
- auto operator-(const Vector2& v) const -> Vector2
- auto operator*(const Vector2& v) const -> Vector2
- auto operator/(const Vector2& v) const -> Vector2
- auto operator+(T s) const -> Vector2
- auto operator-(T s) const -> Vector2
- auto operator*(T s) const -> Vector2
- auto operator/(T s) const -> Vector2
- auto Length() const -> T
- auto SqrLength() const -> T
- auto Normalized() const -> Vector2
- auto Normalize() -> Vector2&
-
template<class S>auto As() -> Vector2<S>
- Converts elements of the vector to a specified type.