Ev3Wrap::Vector
Constructors
Vector(float, float). Construct aVectorvia its X and Y valuesstatic createVectorFromPolar(float bearing, float distance). Construct vector from polar coordinates
The
bearingrefered to in theVectorclass starts from top (north), and continues clockwise. It is measured in degrees.
public methods
float dist(Vector& otherVect = Vector::zero)
getter
Description: gets the length of the vector. If another vector is specified, they are treated as position vectors and it gets the distance between the 2.
float getBearing(Vector& otherVect = Vector::zero)
getter
Description: gets the bearing of the vector. If another vector is specified, it gets the clockwise angle from this vector to the other vector (may be negative)