Public Member Functions | Friends
Angle Class Reference

An angle and related functions. More...

#include <Angle.hh>

List of all members.

Public Member Functions

 Angle ()
 Constructor.
 Angle (double _radian)
 Copy Constructor.
 Angle (const Angle &angle)
 Copy constructor.
virtual ~Angle ()
 Destructor.
void SetFromRadian (double _radian)
 Set the value from an angle in radians.
void SetFromDegree (double degree)
 Set the value from an angle in degrees.
double GetAsRadian () const
 Get the angle in radians.
double GetAsDegree () const
 Get the angle in degrees.
void Normalize ()
 Normalize the angle.
double operator* () const
 Dereference operator.
Angle operator- (const Angle &_angle) const
 Substraction, result = this - _angle.
Angle operator+ (const Angle &_angle) const
 Addition, result = this + _angle.
Angle operator* (const Angle &_angle) const
 Multiplication, result = this * _angle.
Angle operator/ (const Angle &_angle) const
 Division, result = this / _angle.
Angle operator-= (const Angle &_angle)
 Subtraction set, this = this - _angle.
Angle operator+= (const Angle &_angle)
 Addition set, this = this + _angle.
Angle operator*= (const Angle &_angle)
 Multiplication set, this = this * _angle.
Angle operator/= (const Angle &_angle)
 Division set, this = this / _angle.
bool operator== (const Angle &_angle) const
 Equality operator, result = this == _angle.
bool operator!= (const Angle &_angle) const
 Inequality.
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
 Greater than operator.
bool operator>= (const Angle &_angle) const
 Greater equal.

Friends

std::ostream & operator<< (std::ostream &out, const gazebo::math::Angle &a)
 Ostream operator.
std::istream & operator>> (std::istream &in, gazebo::math::Angle &a)
 Istream operator.

Detailed Description

An angle and related functions.


Constructor & Destructor Documentation

Angle ( double  _radian)

Copy Constructor.

Parameters:
_radianRadians
Angle ( const Angle angle)

Copy constructor.

Parameters:
_angleAngle to copy

Member Function Documentation

double GetAsDegree ( ) const

Get the angle in degrees.

Returns:
Double containing the angle's degree value
double GetAsRadian ( ) const

Get the angle in radians.

Returns:
Double containing the angle's radian value
bool operator!= ( const Angle _angle) const

Inequality.

Parameters:
_angleAngle to check for inequality
Returns:
True if this != _angle
double operator* ( ) const [inline]

Dereference operator.

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

Multiplication, result = this * _angle.

Parameters:
_angleAngle for multiplication
Returns:
The new angle
Angle operator*= ( const Angle _angle)

Multiplication set, this = this * _angle.

Parameters:
_angleAngle for multiplication
Returns:
This angle
Angle operator+ ( const Angle _angle) const

Addition, result = this + _angle.

Parameters:
_angleAngle for addition
Returns:
The new angle
Angle operator+= ( const Angle _angle)

Addition set, this = this + _angle.

Parameters:
_angleAngle for addition
Returns:
This angle
Angle operator- ( const Angle _angle) const

Substraction, result = this - _angle.

Parameters:
_angleAngle for substraction
Returns:
The new angle
Angle operator-= ( const Angle _angle)

Subtraction set, this = this - _angle.

Parameters:
_angleAngle for subtraction
Returns:
This angle
Angle operator/ ( const Angle _angle) const

Division, result = this / _angle.

Parameters:
_angleAngle for division
Returns:
The new angle
Angle operator/= ( const Angle _angle)

Division set, this = this / _angle.

Parameters:
_angleAngle for division
Returns:
This angle
bool operator< ( const Angle _angle) const

Less than operator.

Parameters:
_angleAngle to check
Returns:
True if this < _angle
bool operator<= ( const Angle _angle) const

Less or equal operator.

Parameters:
_angleAngle to check
Returns:
True if this <= _angle
bool operator== ( const Angle _angle) const

Equality operator, result = this == _angle.

Parameters:
_angleAngle to check for equality
Returns:
True if this == _angle
bool operator> ( const Angle _angle) const

Greater than operator.

Parameters:
_angleAngle to check
Returns:
True if this > _angle
bool operator>= ( const Angle _angle) const

Greater equal.

Parameters:
_angleAngle to check
Returns:
True if this >= _angle
void SetFromDegree ( double  degree)

Set the value from an angle in degrees.

Parameters:
_degreeDegree value
void SetFromRadian ( double  _radian)

Set the value from an angle in radians.

Parameters:
_radianRadian value

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const gazebo::math::Angle a 
) [friend]

Ostream operator.

Outputs in degrees

Parameters:
outOstream
ptAngle to output
Returns:
The Ostream
std::istream& operator>> ( std::istream &  in,
gazebo::math::Angle a 
) [friend]

Istream operator.

Assumes input is in degrees

Parameters:
inOstream
ptAngle to read value into
Returns:
The istream

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