101 bool Invariant()
const;
106 static double Normalize(
double radian);
Represents a direction in 2D space.
double ToDegree() const
Get direction in degrees.
double DistInRadian(const CDirection2d &dir2) const
Get angle difference in radians.
CDirection2d(const CDirection2d &direction)
Construct a new object by copy.
static CDirection2d FromRadian(double radian)
Construct a new CDirection2d object and initialize from radian.
bool operator==(const CDirection2d &dir2) const
Compare the objects direction with the one of dir2.
bool IsInRange(const CDirection2d &leftDirectionLimit, const CDirection2d &rightDirectionLimit) const
Check if the direction is in the direction range between leftDirectionLimit and rightDirectionLimit.
CDirection2d Avg(double weight, const CDirection2d &dir2) const
Get weighted minimal distance between two directions.
CDirection2d Avg(const CDirection2d &dir2) const
Get minimal distance between two directions.
CDirection2d TurnByRadian(double turn) const
double ToRadian() const
Get direction in radians.
CDirection2d(double radian)
Construct a new object from radian coordinates.
static CDirection2d FromDegree(double degree)
Construct a new CDirection2d object and initialize from degree.
CDirection2d(const CVector2d &direction)
Construct direction using angle of vector.
double DistInDegree(const CDirection2d &dir2) const
Get angle difference in degrees.
Definition of position or mathematical vector on 2D plane.