#include <MRVector2.h>
Public Types | |
using | ValueType = T |
using | MatrixType = Matrix2<T> |
using | SymMatrixType = SymMatrix2<T> |
Public Member Functions | |
constexpr | Vector2 () noexcept |
Vector2 (NoInit) noexcept | |
constexpr | Vector2 (T x, T y) noexcept |
constexpr | Vector2 (const Vector3< T > &v) noexcept |
template<typename U > | |
constexpr | Vector2 (const Vector2< U > &v) noexcept |
constexpr const T & | operator[] (int e) const noexcept |
constexpr T & | operator[] (int e) noexcept |
T | lengthSq () const |
auto | length () const |
Vector2 | normalized () const MR_REQUIRES_IF_SUPPORTED(!std |
Vector2 | operator- () const |
const Vector2 & | operator+ () const |
Vector2 furthestBasisVector() const MR_REQUIRES_IF_SUPPORTED(!std Vector2 | perpendicular () const MR_REQUIRES_IF_SUPPORTED(!std |
returns one of 2 basis unit vector that makes the biggest angle with the direction specified by this | |
Vector2 & | operator+= (const Vector2< T > &b) |
Vector2 & | operator-= (const Vector2< T > &b) |
Vector2 & | operator*= (T b) |
Vector2 & | operator/= (T b) |
bool | isFinite () const MR_REQUIRES_IF_SUPPORTED(std |
Static Public Member Functions | |
static constexpr Vector2 | diagonal (T a) noexcept |
static constexpr Vector2 | plusX () noexcept |
static constexpr Vector2 | plusY () noexcept |
static constexpr Vector2 | minusX () noexcept |
static constexpr Vector2 | minusY () noexcept |
Public Attributes | |
T | x |
T | y |
Static Public Attributes | |
static constexpr int | elements = 2 |
Related Symbols | |
(Note that these are not member symbols.) | |
template<typename T > | |
T | cross (const Vector2< T > &a, const Vector2< T > &b) |
cross product | |
template<typename T > | |
T | dot (const Vector2< T > &a, const Vector2< T > &b) |
dot product | |
template<typename T > | |
T | sqr (const Vector2< T > &a) |
squared length | |
template<typename T > | |
Vector2< T > | mult (const Vector2< T > &a, const Vector2< T > &b) |
per component multiplication | |
template<typename T > | |
Vector2< T > | div (const Vector2< T > &a, const Vector2< T > &b) |
per component division | |
template<typename T > | |
T | angle (const Vector2< T > &a, const Vector2< T > &b) |
angle in radians between two vectors | |
two-dimensional vector
using MR::Vector2< T >::MatrixType = Matrix2<T> |
using MR::Vector2< T >::SymMatrixType = SymMatrix2<T> |
using MR::Vector2< T >::ValueType = T |
|
inlineconstexprnoexcept |
|
inlineexplicitnoexcept |
|
inlineconstexprnoexcept |
|
inlineexplicitconstexprnoexcept |
|
inlineexplicitconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinenodiscard |
|
inline |
|
inline |
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inline |
returns one of 2 basis unit vector that makes the biggest angle with the direction specified by this
returns same length vector orthogonal to this (rotated 90 degrees counter-clockwise)
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
angle in radians between two vectors
cross product
per component division
per component multiplication
|
related |
squared length
|
staticconstexpr |
T MR::Vector2< T >::x |
T MR::Vector2< T >::y |