It defines the basic type CRadians, used to store an angle value in radians. More...

#include <angles.h>

Collaboration diagram for argos::CRadians:

Public Member Functions

 CRadians ()
 Class constructor It initializes m_fValue to 0 radians. More...
 
 CRadians (Real f_value)
 Class constructor It initializes m_fValue to the passed value. More...
 
void FromValueInDegrees (Real f_value)
 Sets the value from a value in degrees It sets m_fValue (which is in radians) converting from the passed value in degrees. More...
 
Real GetValue () const
 Returns the value in radians. More...
 
Real GetAbsoluteValue () const
 Returns the absolute value in radians. More...
 
void SetValue (Real f_value)
 Sets the value in radians. More...
 
CRadiansSignedNormalize ()
 Normalizes the value in the range [-PI:PI]. More...
 
CRadiansUnsignedNormalize ()
 Normalizes the value in the range [0:TWO_PI]. More...
 
CRadiansNegate ()
 
CRadiansoperator+ ()
 
CRadians operator- () const
 
CRadiansoperator+= (const CRadians &c_radians)
 
CRadiansoperator-= (const CRadians &c_radians)
 
CRadiansoperator*= (Real f_value)
 
CRadiansoperator/= (Real f_value)
 
CRadians operator+ (const CRadians &c_radians) const
 
CRadians operator- (const CRadians &c_radians) const
 
CRadians operator* (Real f_value) const
 
Real operator/ (const CRadians &c_radians) const
 
CRadians operator/ (Real f_value) const
 
bool operator< (const CRadians &c_radians) const
 
bool operator<= (const CRadians &c_radians) const
 
bool operator> (const CRadians &c_radians) const
 
bool operator>= (const CRadians &c_radians) const
 
bool operator== (const CRadians &c_radians) const
 
bool operator!= (const CRadians &c_radians) const
 

Static Public Attributes

static const CRadians PI
 The PI constant. More...
 
static const CRadians TWO_PI
 Set to PI * 2. More...
 
static const CRadians PI_OVER_TWO
 Set to PI / 2. More...
 
static const CRadians PI_OVER_THREE
 Set to PI / 3. More...
 
static const CRadians PI_OVER_FOUR
 Set to PI / 4. More...
 
static const CRadians PI_OVER_SIX
 Set to PI / 6. More...
 
static const CRadians ZERO
 Set to zero radians. More...
 
static const CRange< CRadiansSIGNED_RANGE
 The signed normalization range [-PI:PI]. More...
 
static const CRange< CRadiansUNSIGNED_RANGE
 The unsigned normalization range [0:TWO_PI]. More...
 
static const Real RADIANS_TO_DEGREES
 Constant to convert from radians to degrees. More...
 

Detailed Description

It defines the basic type CRadians, used to store an angle value in radians.

Definition at line 42 of file angles.h.

Constructor & Destructor Documentation

◆ CRadians() [1/2]

argos::CRadians::CRadians ( )
inline

Class constructor It initializes m_fValue to 0 radians.

Definition at line 85 of file angles.h.

◆ CRadians() [2/2]

argos::CRadians::CRadians ( Real  f_value)
inlineexplicit

Class constructor It initializes m_fValue to the passed value.

Parameters
f_valuethe wanted value in radians

Definition at line 94 of file angles.h.

Member Function Documentation

◆ FromValueInDegrees()

void argos::CRadians::FromValueInDegrees ( Real  f_value)
inline

Sets the value from a value in degrees It sets m_fValue (which is in radians) converting from the passed value in degrees.

Parameters
f_valuea value in degrees

Definition at line 103 of file angles.h.

◆ GetAbsoluteValue()

Real argos::CRadians::GetAbsoluteValue ( ) const
inline

Returns the absolute value in radians.

Returns
the absolute value in radians

Definition at line 119 of file angles.h.

◆ GetValue()

Real argos::CRadians::GetValue ( ) const
inline

Returns the value in radians.

Returns
the value in radians

Definition at line 111 of file angles.h.

◆ Negate()

CRadians& argos::CRadians::Negate ( )
inline

Definition at line 153 of file angles.h.

◆ operator!=()

bool argos::CRadians::operator!= ( const CRadians c_radians) const
inline

Definition at line 241 of file angles.h.

◆ operator*()

CRadians argos::CRadians::operator* ( Real  f_value) const
inline

Definition at line 198 of file angles.h.

◆ operator*=()

CRadians& argos::CRadians::operator*= ( Real  f_value)
inline

Definition at line 176 of file angles.h.

◆ operator+() [1/2]

CRadians& argos::CRadians::operator+ ( )
inline

Definition at line 158 of file angles.h.

◆ operator+() [2/2]

CRadians argos::CRadians::operator+ ( const CRadians c_radians) const
inline

Definition at line 186 of file angles.h.

◆ operator+=()

CRadians& argos::CRadians::operator+= ( const CRadians c_radians)
inline

Definition at line 166 of file angles.h.

◆ operator-() [1/2]

CRadians argos::CRadians::operator- ( ) const
inline

Definition at line 162 of file angles.h.

◆ operator-() [2/2]

CRadians argos::CRadians::operator- ( const CRadians c_radians) const
inline

Definition at line 192 of file angles.h.

◆ operator-=()

CRadians& argos::CRadians::operator-= ( const CRadians c_radians)
inline

Definition at line 171 of file angles.h.

◆ operator/() [1/2]

Real argos::CRadians::operator/ ( const CRadians c_radians) const
inline

Definition at line 211 of file angles.h.

◆ operator/() [2/2]

CRadians argos::CRadians::operator/ ( Real  f_value) const
inline

Definition at line 215 of file angles.h.

◆ operator/=()

CRadians& argos::CRadians::operator/= ( Real  f_value)
inline

Definition at line 181 of file angles.h.

◆ operator<()

bool argos::CRadians::operator< ( const CRadians c_radians) const
inline

Definition at line 221 of file angles.h.

◆ operator<=()

bool argos::CRadians::operator<= ( const CRadians c_radians) const
inline

Definition at line 225 of file angles.h.

◆ operator==()

bool argos::CRadians::operator== ( const CRadians c_radians) const
inline

Definition at line 237 of file angles.h.

◆ operator>()

bool argos::CRadians::operator> ( const CRadians c_radians) const
inline

Definition at line 229 of file angles.h.

◆ operator>=()

bool argos::CRadians::operator>= ( const CRadians c_radians) const
inline

Definition at line 233 of file angles.h.

◆ SetValue()

void argos::CRadians::SetValue ( Real  f_value)
inline

Sets the value in radians.

Parameters
f_valuethe wanted value in radians

Definition at line 127 of file angles.h.

◆ SignedNormalize()

CRadians& argos::CRadians::SignedNormalize ( )
inline

Normalizes the value in the range [-PI:PI].

Returns
A reference to the current object
See also
CRadians::PI
CRange

Definition at line 137 of file angles.h.

◆ UnsignedNormalize()

CRadians& argos::CRadians::UnsignedNormalize ( )
inline

Normalizes the value in the range [0:TWO_PI].

Returns
A reference to the current object
See also
CRadians::TWO_PI
CRange

Definition at line 148 of file angles.h.

Member Data Documentation

◆ PI

const CRadians argos::CRadians::PI
static

The PI constant.

Definition at line 49 of file angles.h.

◆ PI_OVER_FOUR

const CRadians argos::CRadians::PI_OVER_FOUR
static

Set to PI / 4.

Definition at line 69 of file angles.h.

◆ PI_OVER_SIX

const CRadians argos::CRadians::PI_OVER_SIX
static

Set to PI / 6.

Definition at line 74 of file angles.h.

◆ PI_OVER_THREE

const CRadians argos::CRadians::PI_OVER_THREE
static

Set to PI / 3.

Definition at line 64 of file angles.h.

◆ PI_OVER_TWO

const CRadians argos::CRadians::PI_OVER_TWO
static

Set to PI / 2.

Definition at line 59 of file angles.h.

◆ RADIANS_TO_DEGREES

const Real argos::CRadians::RADIANS_TO_DEGREES
static

Constant to convert from radians to degrees.

Definition at line 275 of file angles.h.

◆ SIGNED_RANGE

const CRange< CRadians > argos::CRadians::SIGNED_RANGE
static

The signed normalization range [-PI:PI].

Definition at line 273 of file angles.h.

◆ TWO_PI

const CRadians argos::CRadians::TWO_PI
static

Set to PI * 2.

Definition at line 54 of file angles.h.

◆ UNSIGNED_RANGE

const CRange< CRadians > argos::CRadians::UNSIGNED_RANGE
static

The unsigned normalization range [0:TWO_PI].

Definition at line 274 of file angles.h.

◆ ZERO

const CRadians argos::CRadians::ZERO
static

Set to zero radians.

Definition at line 79 of file angles.h.