12 : direction(direction), magnitude(magnitude){};
15 : direction(vector.Normalize()), magnitude(vector.GetLength()){};
A Vector2, broken down as a separate magnitude and direction. Assumes that the direction given is nor...
Radians AngleTo(const SeparatedVector2 &other) const
Returns the scalar angle between the two rays.
Scalar Cross(const SeparatedVector2 &other) const
Returns the cross product of the two direction vectors.
Scalar GetAlignment(const SeparatedVector2 &other) const
Vector2 direction
The normalized direction of the vector.
Vector2 GetDirection() const
Returns just the normalized direction vector.
Vector2 GetVector() const
Returns the vector representation of the vector.
Scalar magnitude
The magnitude of the vector.
constexpr Type Cross(const TPoint &p) const
constexpr Type Dot(const TPoint &p) const
constexpr Radians AngleTo(const TPoint &p) const