Loading...
Searching...
No Matches
ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle Class Reference

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)
 

Detailed Description

An angle and related functions.

Constructor & Destructor Documentation

◆ Angle() [1/3]

ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::Angle ( )

Constructor.

◆ Angle() [2/3]

ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::Angle ( const double _radian)

Conversion Constructor.

Parameters
[in]_radianRadians

◆ Angle() [3/3]

ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::Angle ( const Angle & _angle)

Copy constructor.

Parameters
[in]_angleAngle to copy

◆ ~Angle()

virtual ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::~Angle ( )
virtual

Destructor.

Member Function Documentation

◆ Degree() [1/2]

double ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::Degree ( ) const

Get the angle in degrees.

Returns
double containing the angle's degree value

◆ Degree() [2/2]

void ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::Degree ( double _degree)

Set the value from an angle in degrees.

Parameters
[in]_degreeDegree value

◆ Normalize()

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< T >::PrincipalAxesOffset().

◆ operator!=()

bool ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::operator!= ( const Angle & _angle) const

Inequality.

Parameters
[in]_angleAngle to check for inequality
Returns
true if this != _angle

◆ operator()()

double ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::operator() ( ) const

Return the angle's radian value.

Returns
double containing the angle's radian value

◆ operator*() [1/2]

double ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::operator* ( ) const
inline

Dereference operator.

Returns
Double containing the angle's radian value

◆ operator*() [2/2]

Angle ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::operator* ( const Angle & _angle) const

Multiplication operator, result = this * _angle.

Parameters
[in]_angleAngle for multiplication
Returns
the new angle

◆ operator*=()

Angle ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::operator*= ( const Angle & _angle)

Multiplication set, this = this * _angle.

Parameters
[in]_angleAngle for multiplication
Returns
angle

◆ operator+()

Angle ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::operator+ ( const Angle & _angle) const

Addition operator, result = this + _angle.

Parameters
[in]_angleAngle for addition
Returns
the new angle

◆ operator+=()

Angle ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::operator+= ( const Angle & _angle)

Addition set, this = this + _angle.

Parameters
[in]_angleAngle for addition
Returns
angle

◆ operator-()

Angle ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::operator- ( const Angle & _angle) const

Substraction, result = this - _angle.

Parameters
[in]_angleAngle for substraction
Returns
the new angle

◆ operator-=()

Angle ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::operator-= ( const Angle & _angle)

Subtraction set, this = this - _angle.

Parameters
[in]_angleAngle for subtraction
Returns
angle

◆ operator/()

Angle ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::operator/ ( const Angle & _angle) const

Division, result = this / _angle.

Parameters
[in]_angleAngle for division
Returns
the new angle

◆ operator/=()

Angle ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::operator/= ( const Angle & _angle)

Division set, this = this / _angle.

Parameters
[in]_angleAngle for division
Returns
angle

◆ operator<()

bool ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::operator< ( const Angle & _angle) const

Less than operator.

Parameters
[in]_angleAngle to check
Returns
true if this < _angle

◆ operator<=()

bool ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::operator<= ( const Angle & _angle) const

Less or equal operator.

Parameters
[in]_angleAngle to check
Returns
true if this <= _angle

◆ operator==()

bool ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::operator== ( const Angle & _angle) const

Equality operator, result = this == _angle.

Parameters
[in]_angleAngle to check for equality
Returns
true if this == _angle

◆ operator>()

bool ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::operator> ( const Angle & _angle) const

Greater than operator.

Parameters
[in]_angleAngle to check
Returns
true if this > _angle

◆ operator>=()

bool ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::operator>= ( const Angle & _angle) const

Greater or equal operator.

Parameters
[in]_angleAngle to check
Returns
true if this >= _angle

◆ Radian() [1/2]

double ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::Radian ( ) const

Get the angle in radians.

Returns
double containing the angle's radian value

◆ Radian() [2/2]

void ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::Radian ( double _radian)

Set the value from an angle in radians.

Parameters
[in]_radianRadian value

Referenced by ignition::math::IGNITION_MATH_VERSION_NAMESPACE::MassMatrix3< T >::PrincipalAxesOffset().

Member Data Documentation

◆ HalfPi

const Angle ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::HalfPi
static

math::Angle(IGN_PI * 0.5)

◆ Pi

const Angle ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::Pi
static

math::Angle(IGN_PI)

◆ TwoPi

const Angle ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::TwoPi
static

math::Angle(IGN_PI * 2)

◆ Zero

const Angle ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Angle::Zero
static

math::Angle(0)


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