An angle and related functions. More...
#include <math/gzmath.hh>
Public Member Functions | |
Angle () | |
Constructor. More... | |
Angle (double _radian) | |
Copy Constructor. More... | |
Angle (const Angle &_angle) | |
Copy constructor. More... | |
Angle (const ignition::math::Angle &_angle) | |
Ignition copy constructor. More... | |
virtual | ~Angle () |
Destructor. More... | |
double | Degree () const |
Get the angle in degrees. More... | |
ignition::math::Angle | Ign () const |
Convert this angle to an ignition::math::Angle. More... | |
void | Normalize () |
Normalize the angle in the range -Pi to Pi. More... | |
bool | operator!= (const Angle &_angle) const |
Inequality. More... | |
double | operator* () const |
Dereference operator. More... | |
Angle | operator* (const Angle &_angle) const |
Multiplication operator, result = this * _angle. More... | |
Angle | operator*= (const Angle &_angle) |
Multiplication set, this = this * _angle. More... | |
Angle | operator+ (const Angle &_angle) const |
Addition operator, result = this + _angle. More... | |
Angle | operator+= (const Angle &_angle) |
Addition set, this = this + _angle. More... | |
Angle | operator- (const Angle &_angle) const |
Substraction, result = this - _angle. More... | |
Angle | operator-= (const Angle &_angle) |
Subtraction set, this = this - _angle. More... | |
Angle | operator/ (const Angle &_angle) const |
Division, result = this / _angle. More... | |
Angle | operator/= (const Angle &_angle) |
Division set, this = this / _angle. More... | |
bool | operator< (const Angle &_angle) const |
Less than operator. More... | |
bool | operator<= (const Angle &_angle) const |
Less or equal operator. More... | |
Angle & | operator= (const double &_angle) |
Assignment operator. More... | |
Angle & | operator= (const ignition::math::Angle &_angle) |
Assignment operator. More... | |
bool | operator== (const Angle &_angle) const |
Equality operator, result = this == _angle. More... | |
bool | operator> (const Angle &_angle) const |
Greater than operator. More... | |
bool | operator>= (const Angle &_angle) const |
Greater or equal operator. More... | |
double | Radian () const |
Get the angle in radians. More... | |
void | SetFromDegree (double _degree) |
Set the value from an angle in degrees. More... | |
void | SetFromRadian (double _radian) |
Set the value from an angle in radians. More... | |
Static Public Attributes | |
static const Angle | HalfPi |
math::Angle(M_PI * 0.5) More... | |
static const Angle | Pi |
math::Angle(M_PI) More... | |
static const Angle | TwoPi |
math::Angle(M_PI * 2) More... | |
static const Angle | Zero |
math::Angle(0) More... | |
Friends | |
std::ostream & | operator<< (std::ostream &_out, const gazebo::math::Angle &_a) |
Stream insertion operator. More... | |
std::istream & | operator>> (std::istream &_in, gazebo::math::Angle &_a) |
Stream extraction operator. More... | |
An angle and related functions.
Angle | ( | ) |
Constructor.
Angle | ( | double | _radian | ) |
Copy Constructor.
[in] | _radian | Radians |
Angle | ( | const ignition::math::Angle & | _angle | ) |
Ignition copy constructor.
[in] | _angle | Ignition angle to copy |
|
virtual |
Destructor.
double Degree | ( | ) | const |
Get the angle in degrees.
ignition::math::Angle Ign | ( | ) | const |
Convert this angle to an ignition::math::Angle.
Referenced by Angle::operator*().
void Normalize | ( | ) |
Normalize the angle in the range -Pi to Pi.
bool operator!= | ( | const Angle & | _angle | ) | const |
Inequality.
[in] | _angle | Angle to check for inequality |
Referenced by Angle::operator*().
|
inline |
Dereference operator.
References Angle::Ign(), Angle::operator!=(), Angle::operator*=(), Angle::operator+(), Angle::operator+=(), Angle::operator-(), Angle::operator-=(), Angle::operator/(), Angle::operator/=(), Angle::operator<(), Angle::operator<=(), Angle::operator=(), Angle::operator==(), Angle::operator>(), and Angle::operator>=().
Multiplication operator, result = this * _angle.
[in] | _angle | Angle for multiplication |
Multiplication set, this = this * _angle.
[in] | _angle | Angle for multiplication |
Referenced by Angle::operator*().
Addition operator, result = this + _angle.
[in] | _angle | Angle for addition |
Referenced by Angle::operator*().
Addition set, this = this + _angle.
[in] | _angle | Angle for addition |
Referenced by Angle::operator*().
Substraction, result = this - _angle.
[in] | _angle | Angle for substraction |
Referenced by Angle::operator*().
Subtraction set, this = this - _angle.
[in] | _angle | Angle for subtraction |
Referenced by Angle::operator*().
Division, result = this / _angle.
[in] | _angle | Angle for division |
Referenced by Angle::operator*().
Division set, this = this / _angle.
[in] | _angle | Angle for division |
Referenced by Angle::operator*().
bool operator< | ( | const Angle & | _angle | ) | const |
Less than operator.
[in] | _angle | Angle to check |
Referenced by Angle::operator*().
bool operator<= | ( | const Angle & | _angle | ) | const |
Less or equal operator.
[in] | _angle | Angle to check |
Referenced by Angle::operator*().
Angle& operator= | ( | const double & | _angle | ) |
Assignment operator.
[in] | _angle | Radians |
Referenced by Angle::operator*().
Angle& operator= | ( | const ignition::math::Angle & | _angle | ) |
Assignment operator.
[in] | _angle | ignition::math::Angle to copy |
bool operator== | ( | const Angle & | _angle | ) | const |
Equality operator, result = this == _angle.
[in] | _angle | Angle to check for equality |
Referenced by Angle::operator*().
bool operator> | ( | const Angle & | _angle | ) | const |
Greater than operator.
[in] | _angle | Angle to check |
Referenced by Angle::operator*().
bool operator>= | ( | const Angle & | _angle | ) | const |
Greater or equal operator.
[in] | _angle | Angle to check |
Referenced by Angle::operator*().
double Radian | ( | ) | const |
Get the angle in radians.
void SetFromDegree | ( | double | _degree | ) |
Set the value from an angle in degrees.
[in] | _degree | Degree value |
void SetFromRadian | ( | double | _radian | ) |
Set the value from an angle in radians.
[in] | _radian | Radian value |
|
friend |
Stream insertion operator.
Outputs in degrees
[in] | _out | output stream |
[in] | _a | angle to output |
|
friend |
Stream extraction operator.
Assumes input is in degrees
in | input stream |
pt | angle to read value into |
|
static |
math::Angle(M_PI * 0.5)
|
static |
math::Angle(M_PI)
|
static |
math::Angle(M_PI * 2)
|
static |
math::Angle(0)