All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Friends | List of all members
gazebo::math::Angle Class Reference

An angle and related functions. More...

#include <math/gzmath.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.
 
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.
 

Detailed Description

An angle and related functions.

Constructor & Destructor Documentation

gazebo::math::Angle::Angle ( )

Constructor.

gazebo::math::Angle::Angle ( double  _radian)

Copy Constructor.

Parameters
[in]_radianRadians
gazebo::math::Angle::Angle ( const Angle _angle)

Copy constructor.

Parameters
[in]_angleAngle to copy
virtual gazebo::math::Angle::~Angle ( )
virtual

Destructor.

Member Function Documentation

double gazebo::math::Angle::Degree ( ) const

Get the angle in degrees.

Returns
double containing the angle's degree value
void gazebo::math::Angle::Normalize ( )

Normalize the angle in the range -Pi to Pi.

bool gazebo::math::Angle::operator!= ( const Angle _angle) const

Inequality.

Parameters
[in]_angleAngle to check for inequality
Returns
true if this != _angle
double gazebo::math::Angle::operator* ( ) const
inline

Dereference operator.

Returns
Double containing the angle's radian value
Angle gazebo::math::Angle::operator* ( const Angle _angle) const

Multiplication operator, result = this * _angle.

Parameters
[in]_angleAngle for multiplication
Returns
the new angle
Angle gazebo::math::Angle::operator*= ( const Angle _angle)

Multiplication set, this = this * _angle.

Parameters
[in]_angleAngle for multiplication
Returns
angle
Angle gazebo::math::Angle::operator+ ( const Angle _angle) const

Addition operator, result = this + _angle.

Parameters
[in]_angleAngle for addition
Returns
the new angle
Angle gazebo::math::Angle::operator+= ( const Angle _angle)

Addition set, this = this + _angle.

Parameters
[in]_angleAngle for addition
Returns
angle
Angle gazebo::math::Angle::operator- ( const Angle _angle) const

Substraction, result = this - _angle.

Parameters
[in]_angleAngle for substraction
Returns
the new angle
Angle gazebo::math::Angle::operator-= ( const Angle _angle)

Subtraction set, this = this - _angle.

Parameters
[in]_angleAngle for subtraction
Returns
angle
Angle gazebo::math::Angle::operator/ ( const Angle _angle) const

Division, result = this / _angle.

Parameters
[in]_angleAngle for division
Returns
the new angle
Angle gazebo::math::Angle::operator/= ( const Angle _angle)

Division set, this = this / _angle.

Parameters
[in]_angleAngle for division
Returns
angle
bool gazebo::math::Angle::operator< ( const Angle _angle) const

Less than operator.

Parameters
[in]_angleAngle to check
Returns
true if this < _angle
bool gazebo::math::Angle::operator<= ( const Angle _angle) const

Less or equal operator.

Parameters
[in]_angleAngle to check
Returns
true if this <= _angle
bool gazebo::math::Angle::operator== ( const Angle _angle) const

Equality operator, result = this == _angle.

Parameters
[in]_angleAngle to check for equality
Returns
true if this == _angle
bool gazebo::math::Angle::operator> ( const Angle _angle) const

Greater than operator.

Parameters
[in]_angleAngle to check
Returns
true if this > _angle
bool gazebo::math::Angle::operator>= ( const Angle _angle) const

Greater or equal operator.

Parameters
[in]_angleAngle to check
Returns
true if this >= _angle
double gazebo::math::Angle::Radian ( ) const

Get the angle in radians.

Returns
double containing the angle's radian value
void gazebo::math::Angle::SetFromDegree ( double  _degree)

Set the value from an angle in degrees.

Parameters
[in]_degreeDegree value
void gazebo::math::Angle::SetFromRadian ( double  _radian)

Set the value from an angle in radians.

Parameters
[in]_radianRadian value

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  _out,
const gazebo::math::Angle _a 
)
friend

Stream insertion operator.

Outputs in degrees

Parameters
[in]_outoutput stream
[in]_aangle to output
Returns
The output stream
std::istream& operator>> ( std::istream &  _in,
gazebo::math::Angle _a 
)
friend

Stream extraction operator.

Assumes input is in degrees

Parameters
ininput stream
ptangle to read value into
Returns
The input stream

The documentation for this class was generated from the following file: