A polar vector.
Definition Polar.h:13
Polar operator/(const float &factor)
Scale the vector uniformly down.
Definition Polar.cpp:70
float angle
The angle in degrees, clockwise rotation.
Definition Polar.h:19
static const Polar zero
A polar vector with zero degrees and distance.
Definition Polar.h:40
Polar operator-()
Negate the polar vector.
Definition Polar.cpp:56
static float Distance(const Polar &v1, const Polar &v2)
The distance between two vectors.
Definition Polar.cpp:24
Polar operator*(float factor) const
Scale the vector uniformly up.
Definition Polar.cpp:66
Polar operator+(const Polar &v) const
Add another polar vector to this polar vector.
Definition Polar.cpp:30
static Polar Rotate(Polar v, float angle)
Rotate the vector.
Definition Polar.cpp:74
Polar()
Create a new polar vector with zero degrees and distance.
Definition Polar.cpp:6
float distance
The distance in meters.
Definition Polar.h:24