An angle and related functions. More...
#include <ignition/math/Angle.hh>
Public Member Functions | |
Angle () | |
Constructor. | |
Angle (const Angle &_angle) | |
Copy constructor. | |
Angle (const double _radian) | |
Conversion Constructor. | |
virtual | ~Angle () |
Destructor. | |
double | Degree () const |
Get the angle in degrees. | |
void | Degree (double _degree) |
Set the value from an angle in degrees. | |
void | Normalize () |
Normalize the angle in the range -Pi to Pi. | |
bool | operator!= (const Angle &_angle) const |
Inequality. | |
double | operator() () const |
Return the angle's radian value. | |
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 | Radian (double _radian) |
Set the value from an angle in radians. |
Static Public Attributes | |
static const Angle | HalfPi |
math::Angle(IGN_PI * 0.5) | |
static const Angle | Pi |
math::Angle(IGN_PI) | |
static const Angle | TwoPi |
math::Angle(IGN_PI * 2) | |
static const Angle | Zero |
math::Angle(0) |
An angle and related functions.
ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::Angle | ( | ) |
Constructor.
Referenced by Angle(), operator!=(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<(), operator<=(), operator==(), operator>(), and operator>=().
ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::Angle | ( | const double | _radian | ) |
Conversion Constructor.
[in] | _radian | Radians |
ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::Angle | ( | const Angle & | _angle | ) |
|
virtual |
Destructor.
double ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::Degree | ( | ) | const |
Get the angle in degrees.
void ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::Degree | ( | double | _degree | ) |
Set the value from an angle in degrees.
[in] | _degree | Degree value |
void ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::Normalize | ( | ) |
Normalize the angle in the range -Pi to Pi.
Referenced by ignition::math::IGNITION_MATH_VERSION_NAMESPACE::MassMatrix3< double >::PrincipalAxesOffset().
bool ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::operator!= | ( | const Angle & | _angle | ) | const |
double ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::operator() | ( | ) | const |
Return the angle's radian value.
|
inline |
Dereference operator.
bool ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::operator< | ( | const Angle & | _angle | ) | const |
bool ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::operator<= | ( | const Angle & | _angle | ) | const |
bool ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::operator== | ( | const Angle & | _angle | ) | const |
bool ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::operator> | ( | const Angle & | _angle | ) | const |
bool ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::operator>= | ( | const Angle & | _angle | ) | const |
double ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::Radian | ( | ) | const |
Get the angle in radians.
void ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::Radian | ( | double | _radian | ) |
Set the value from an angle in radians.
[in] | _radian | Radian value |
Referenced by operator<<, and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::MassMatrix3< double >::PrincipalAxesOffset().
|
static |
math::Angle(IGN_PI * 0.5)
|
static |
math::Angle(IGN_PI)
|
static |
math::Angle(IGN_PI * 2)
|
static |
math::Angle(0)