An angle and related functions. More...
#include <Angle.hh>
Public Member Functions | |
Angle () | |
Constructor. | |
Angle (double _radian) | |
Copy Constructor. | |
Angle (const Angle &_angle) | |
Copy constructor. | |
virtual | ~Angle () |
Destructor. | |
double | Degree () const |
Get the angle in degrees. | |
double | GetAsDegree () const __attribute__((deprecated)) |
Get the angle in degrees. | |
double | GetAsRadian () const __attribute__((deprecated)) |
Get the angle in radians. | |
void | Normalize () |
Normalize the angle in the range -Pi to Pi. | |
bool | operator!= (const Angle &_angle) const |
Inequality. | |
double | operator* () const |
Dereference operator. | |
Angle | operator* (const Angle &_angle) const |
Multiplication operator, result = this * _angle. | |
Angle | operator*= (const Angle &_angle) |
Multiplication set, this = this * _angle. | |
Angle | operator+ (const Angle &_angle) const |
Addition operator, result = this + _angle. | |
Angle | operator+= (const Angle &_angle) |
Addition set, this = this + _angle. | |
Angle | operator- (const Angle &_angle) const |
Substraction, result = this - _angle. | |
Angle | operator-= (const Angle &_angle) |
Subtraction set, this = this - _angle. | |
Angle | operator/ (const Angle &_angle) const |
Division, result = this / _angle. | |
Angle | operator/= (const Angle &_angle) |
Division set, this = this / _angle. | |
bool | operator< (const Angle &_angle) const |
Less than operator. | |
bool | operator<= (const Angle &_angle) const |
Less or equal operator. | |
bool | operator== (const Angle &_angle) const |
Equality operator, result = this == _angle. | |
bool | operator> (const Angle &_angle) const |
Greater than operator. | |
bool | operator>= (const Angle &_angle) const |
Greater or equal operator. | |
double | Radian () const |
Get the angle in radians. | |
void | SetFromDegree (double _degree) |
Set the value from an angle in degrees. | |
void | SetFromRadian (double _radian) |
Set the value from an angle in radians. | |
Friends | |
std::ostream & | operator<< (std::ostream &_out, const gazebo::math::Angle &_a) |
Stream insertion operator. | |
std::istream & | operator>> (std::istream &_in, gazebo::math::Angle &_a) |
Stream extraction operator. | |
An angle and related functions.
gazebo::math::Angle::Angle | ( | ) |
Constructor.
gazebo::math::Angle::Angle | ( | double | _radian | ) |
Copy Constructor.
[in] | _radian | Radians |
gazebo::math::Angle::Angle | ( | const Angle & | _angle | ) |
Copy constructor.
[in] | _angle | Angle to copy |
|
virtual |
Destructor.
double gazebo::math::Angle::Degree | ( | ) | const |
Get the angle in degrees.
double gazebo::math::Angle::GetAsDegree | ( | ) | const |
Get the angle in degrees.
double gazebo::math::Angle::GetAsRadian | ( | ) | const |
Get the angle in radians.
void gazebo::math::Angle::Normalize | ( | ) |
Normalize the angle in the range -Pi to Pi.
bool gazebo::math::Angle::operator!= | ( | const Angle & | _angle | ) | const |
|
inline |
Dereference operator.
Multiplication operator, result = this * _angle.
[in] | _angle | Angle for multiplication |
Multiplication set, this = this * _angle.
[in] | _angle | Angle for multiplication |
Addition operator, result = this + _angle.
[in] | _angle | Angle for addition |
Substraction, result = this - _angle.
[in] | _angle | Angle for substraction |
bool gazebo::math::Angle::operator< | ( | const Angle & | _angle | ) | const |
bool gazebo::math::Angle::operator<= | ( | const Angle & | _angle | ) | const |
bool gazebo::math::Angle::operator== | ( | const Angle & | _angle | ) | const |
Equality operator, result = this == _angle.
[in] | _angle | Angle to check for equality |
bool gazebo::math::Angle::operator> | ( | const Angle & | _angle | ) | const |
bool gazebo::math::Angle::operator>= | ( | const Angle & | _angle | ) | const |
double gazebo::math::Angle::Radian | ( | ) | const |
Get the angle in radians.
void gazebo::math::Angle::SetFromDegree | ( | double | _degree | ) |
Set the value from an angle in degrees.
[in] | _degree | Degree value |
void gazebo::math::Angle::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 |