Class Angle#
Defined in File Coordinates.h
Class Documentation#
-
class Angle#
Mathmatical angle representation.
Angle is a wrapper class for angle values. Angles are stored as radian values. For consistence, its value needs to be in [0,2*pi].
- Author
beyss
- Date
03.07.2017
Public Functions
-
inline Angle(double angle)#
constructor
Creates a Angle from an angle value. If necessary, the value is corrected to be consistent.
- Parameters:
angle – the angle value
-
inline double value() const#
Returns the value of this angle.
- Returns:
the angle value
-
inline double operator=(double angle)#
Assignment operator setting this Angle’s value. If necessary, the value is corrected to be consistent.
- Parameters:
angle – the angle value in radians
- Returns:
the adjusted angle value
-
inline bool operator==(const Angle &rhs) const#
Equal to operator checking wether this Angle’s value is equal to the other Angle’s value.
- Parameters:
rhs – the other Angle
- Returns:
if equal or not
-
inline bool operator<(const Angle &rhs) const#
Smaller than operator checking wether this Angle’s value is smaller than the other Angle’s value.
- Parameters:
rhs – the other Angle
- Returns:
if smaller than or not
-
inline bool operator<=(const Angle &rhs) const#
Smaller than or equal to operator checking wether this Angle’s value is smaller than or equal to the other Angle’s value.
- Parameters:
rhs – the other Angle
- Returns:
if smaller than or equal or not
-
inline bool operator>(const Angle &rhs) const#
Greater than operator checking wether this Angle’s value is greater than the other Angle’s value.
- Parameters:
rhs – the other Angle
- Returns:
if greater than or not
-
inline bool operator>=(const Angle &rhs) const#
Greater than or equal to operator checking wether this Angle’s value is smaller than or equal to the other Angle’s value.
- Parameters:
rhs – the other Angle
- Returns:
if greater than or equal or not
-
inline Angle &operator+=(const Angle &rhs)#
Addition assignment operator increasing this Angle’s value by the other Angle’s value. If necessary, the value is corrected to be consistent.
- Parameters:
rhs – the other Angle
- Returns:
a reference to this angle
-
inline Angle operator+(const Angle &rhs) const#
this + rhs
Friend addition operator returning an Angle equal to the return of this += rhs. It operates on a copy of lhs so that the original object is not changed.
-
inline Angle &operator-=(const Angle &rhs)#
Subtraction assignment operator decreasing this Angle’s value by the other Angle’s value. If necessary, the value is corrected to be consistent.
- Parameters:
rhs – the other angle
- Returns:
a reference to this angle
-
inline Angle operator-(const Angle &rhs) const#
this - rhs
Friend addition operator returning an Angle equal to the return of this - rhs. It operates on a copy of lhs so that the original object is not changed.
-
inline Angle &operator*=(double val)#
Multiplication assignment operator multiplying this Angle’s value with the given double value. If necessary, the value is corrected to be consistent.
- Parameters:
rhs – the factor
- Returns:
a reference to this angle
-
inline Angle operator*(double val) const#
Multiplication operator returning an Angle with the value of adjusted this * val.
- Parameters:
val – the factor
- Returns:
a new Angle equal to this * val
Public Static Functions