30namespace LinearAlgebra {
AngleOf< float > Angle
Definition Angle.h:42
Definition AbsoluteEncoder.h:5
A polar vector.
Definition Polar.h:19
A 2=dimensional vector.
Definition Vector2.h:38
static const Vector2 up
A normalized up-oriented vector.
Definition Vector2.h:73
Vector2 operator+(const Vector2 &v) const
Add a vector to this vector.
Definition Vector2.cpp:90
Vector2 normalized() const
Convert the vector to a length 1.
Definition Vector2.cpp:71
friend Vector2 operator*(float f, const Vector2 &v)
Vector2()
A new 2-dimensional zero vector.
Definition Vector2.cpp:16
static Vector2 Normalize(const Vector2 &v)
Convert the vector to a length of 1.
Definition Vector2.cpp:63
static const Vector2 zero
A vector with zero for all axis.
Definition Vector2.h:60
static Vector2 Rotate(const Vector2 &v, Passer::LinearAlgebra::Angle a)
Rotate the vector.
Definition Vector2.cpp:154
static const Vector2 one
A vector with one for all axis.
Definition Vector2.h:62
Vector2 operator*=(float f)
Definition Vector2.cpp:108
static float SignedAngle(const Vector2 &v1, const Vector2 &v2)
The signed angle between two vectors.
Definition Vector2.cpp:136
Vector2 operator-()
Negate the vector such that it points in the opposite direction.
Definition Vector2.cpp:80
static float Dot(const Vector2 &v1, const Vector2 &v2)
The dot product of two vectors.
Definition Vector2.cpp:125
static const Vector2 down
A normalized down-oriented vector.
Definition Vector2.h:76
Vector2 operator/=(float f)
Definition Vector2.cpp:119
static Vector2 Scale(const Vector2 &v1, const Vector2 &v2)
Scale the vector using another vector.
Definition Vector2.cpp:99
Vector2(float right, float forward)
A new 2-dimensional vector.
Vector2 operator+=(const Vector2 &v)
Definition Vector2.cpp:93
Vector2 operator-=(const Vector2 &v)
Definition Vector2.cpp:85
static Vector2 Lerp(const Vector2 &v1, const Vector2 &v2, float f)
Lerp (linear interpolation) between two vectors.
Definition Vector2.cpp:171
static const Vector2 right
A normalized right-oriented vector.
Definition Vector2.h:68
static const Vector2 left
A normalized left-oriented vector.
Definition Vector2.h:70
float magnitude() const
The vector length.
Definition Vector2.cpp:59
friend Vector2 operator*(const Vector2 &v, float f)
Scale the vector uniformly up.
float sqrMagnitude() const
The squared vector length.
Definition Vector2.cpp:61
static float Distance(const Vector2 &v1, const Vector2 &v2)
The distance between two vectors.
Definition Vector2.cpp:129
Vector2(Polar v)
Convert a Polar vector to a 2-dimensional vector.
friend Vector2 operator/(const Vector2 &v, float f)
Scale the vector uniformly down.
friend Vector2 operator/(float f, const Vector2 &v)
~Vector2()
Vector2 destructor.
Definition Vector2.cpp:41
static float Magnitude(const Vector2 &v)
The vector length.
Definition Vector2.cpp:56
bool operator==(const Vector2 &v)
Check if this vector to the given vector.
Definition Vector2.cpp:52
static const Vector2 back
A normalized back-oriented vector.
Definition Vector2.h:66
static const Vector2 forward
A normalized forward-oriented vector.
Definition Vector2.h:64
static float SqrMagnitude(const Vector2 &v)
The squared vector length.
Definition Vector2.cpp:60
A 3-dimensional vector.
Definition Vector3.h:42
2-dimensional Vector representation
Definition Vector2.h:16
float y
The upward/forward axis of the vector.
Definition Vector2.h:24
float x
The right axis of the vector.
Definition Vector2.h:20