Angle.hh
Go to the documentation of this file.
The Angle class is used to simplify and clarify the use of radians and degrees measurements....
Definition: Angle.hh:62
Angle operator*=(const Angle &_angle)
Multiplication set operator, this = this * _angle.
Angle()
Default constructor that initializes an Angle to zero radians/degrees.
bool operator<=(const Angle &_angle) const
Less than or equal operator.
Angle(const double _radian)
Conversion constructor that initializes an Angle to the specified radians. This constructor supports ...
bool operator==(const Angle &_angle) const
Equality operator, result = this == _angle.
bool operator>=(const Angle &_angle) const
Greater than or equal operator.
Angle operator/=(const Angle &_angle)
Division set operator, this = this / _angle.
Angle(const Angle &_angle)
Copy constructor that initializes this Angle to the value contained in the _angle parameter.
static const Angle Pi
An angle with a value of Pi. Equivalent to math::Angle(IGN_PI).
Definition: Angle.hh:69
void SetDegree(double _degree)
Set the value from an angle in degrees.
Angle operator+=(const Angle &_angle)
Addition set operator, this = this + _angle.
Angle operator-=(const Angle &_angle)
Subtraction set operator, this = this - _angle.
Angle operator+(const Angle &_angle) const
Addition operator, result = this + _angle.
friend std::istream & operator>>(std::istream &_in, Angle &_a)
Stream extraction operator. Assumes input is in radians.
Definition: Angle.hh:247
static const Angle Zero
An angle with a value of zero. Equivalent to math::Angle(0).
Definition: Angle.hh:65
static const Angle TwoPi
An angle with a value of Pi * 2. Equivalent to math::Angle(IGN_PI * 2).
Definition: Angle.hh:77
static const Angle HalfPi
An angle with a value of Pi * 0.5. Equivalent to math::Angle(IGN_PI * 0.5).
Definition: Angle.hh:73
friend std::ostream & operator<<(std::ostream &_out, const Angle &_a)
Stream insertion operator. Outputs in radians.
Definition: Angle.hh:236
double operator*() const
Dereference operator.
Definition: Angle.hh:157
Angle operator*(const Angle &_angle) const
Multiplication operator, result = this * _angle.
Angle operator/(const Angle &_angle) const
Division operator, result = this / _angle.
Angle operator-(const Angle &_angle) const
Subtraction operator, result = this - _angle.
Angle Normalized() const
Return the normalized angle in the range -Pi to Pi. This does not modify the value contained in this ...
void SetRadian(double _radian)
Set the value from an angle in radians.
void Normalize()
Normalize the angle in the range -Pi to Pi. This modifies the value contained in this Angle instance.
Definition: Angle.hh:43
T setf(T... args)