Warning: include(php/utility.php): Failed to open stream: No such file or directory in /home/argos/argos3/doc/api/embedded/a02342.php on line 2

Warning: include(): Failed opening 'php/utility.php' for inclusion (include_path='.:/usr/lib64/php') in /home/argos/argos3/doc/api/embedded/a02342.php on line 2
The ARGoS Website

argos::CDegrees Class Reference

It defines the basic type CDegrees, used to store an angle value in degrees. More...

#include <angles.h>

Public Member Functions

 CDegrees ()
 Class constructor It initializes m_fValue to 0 degrees. More...
 
 CDegrees (Real f_value)
 Class constructor It initializes m_fValue to the passed value. More...
 
void FromValueInRadians (Real f_value)
 Sets the value from a value in radians It sets m_fValue (which is in degrees) converting from the passed value in radians. More...
 
Real GetValue () const
 Returns the value in degrees. More...
 
Real GetAbsoluteValue () const
 Returns the absolute value in degrees. More...
 
void SetValue (Real f_value)
 Sets the value in degrees. More...
 
CDegreesSignedNormalize ()
 Normalizes the value in the range [-180:180]. More...
 
CDegreesUnsignedNormalize ()
 Normalizes the value in the range [0:360]. More...
 
CDegreesoperator+ ()
 
CDegrees operator- () const
 
CDegreesoperator+= (const CDegrees &c_degrees)
 
CDegreesoperator-= (const CDegrees &c_degrees)
 
CDegreesoperator*= (Real f_value)
 
CDegreesoperator/= (Real f_value)
 
CDegrees operator+ (const CDegrees &c_degrees) const
 
CDegrees operator- (const CDegrees &c_degrees) const
 
CDegrees operator* (Real f_value) const
 
Real operator/ (const CDegrees &c_degrees) const
 
CDegrees operator/ (Real f_value) const
 
bool operator< (const CDegrees &c_degrees) const
 
bool operator<= (const CDegrees &c_degrees) const
 
bool operator> (const CDegrees &c_degrees) const
 
bool operator>= (const CDegrees &c_degrees) const
 
bool operator== (const CDegrees &c_degrees) const
 
bool operator!= (const CDegrees &c_degrees) const
 

Friends

CDegrees operator* (Real f_value, const CDegrees &c_degrees)
 
CRadians ToRadians (const CDegrees &c_degrees)
 Converts this object to CRadians. More...
 
CDegrees NormalizedDifference (const CDegrees &c_angle1, const CDegrees &c_angle2)
 Calculates the normalized difference between the given angles. More...
 
std::ostream & operator<< (std::ostream &c_os, const CDegrees &c_degrees)
 
std::istream & operator>> (std::istream &is, CDegrees &c_degrees)
 

Detailed Description

It defines the basic type CDegrees, used to store an angle value in degrees.

Definition at line 288 of file angles.h.

Constructor & Destructor Documentation

◆ CDegrees() [1/2]

argos::CDegrees::CDegrees ( )
inline

Class constructor It initializes m_fValue to 0 degrees.

Definition at line 296 of file angles.h.

◆ CDegrees() [2/2]

argos::CDegrees::CDegrees ( Real  f_value)
inlineexplicit

Class constructor It initializes m_fValue to the passed value.

Parameters
f_valuethe wanted value in degrees

Definition at line 305 of file angles.h.

Member Function Documentation

◆ FromValueInRadians()

void argos::CDegrees::FromValueInRadians ( Real  f_value)
inline

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

Parameters
f_valuea value in radians

Definition at line 314 of file angles.h.

◆ GetAbsoluteValue()

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

Returns the absolute value in degrees.

Returns
the absolute value in degrees

Definition at line 330 of file angles.h.

◆ GetValue()

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

Returns the value in degrees.

Returns
the value in degrees

Definition at line 322 of file angles.h.

◆ operator!=()

bool argos::CDegrees::operator!= ( const CDegrees c_degrees) const
inline

Definition at line 445 of file angles.h.

◆ operator*()

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

Definition at line 402 of file angles.h.

◆ operator*=()

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

Definition at line 380 of file angles.h.

◆ operator+() [1/2]

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

Definition at line 362 of file angles.h.

◆ operator+() [2/2]

CDegrees argos::CDegrees::operator+ ( const CDegrees c_degrees) const
inline

Definition at line 390 of file angles.h.

◆ operator+=()

CDegrees& argos::CDegrees::operator+= ( const CDegrees c_degrees)
inline

Definition at line 370 of file angles.h.

◆ operator-() [1/2]

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

Definition at line 366 of file angles.h.

◆ operator-() [2/2]

CDegrees argos::CDegrees::operator- ( const CDegrees c_degrees) const
inline

Definition at line 396 of file angles.h.

◆ operator-=()

CDegrees& argos::CDegrees::operator-= ( const CDegrees c_degrees)
inline

Definition at line 375 of file angles.h.

◆ operator/() [1/2]

Real argos::CDegrees::operator/ ( const CDegrees c_degrees) const
inline

Definition at line 415 of file angles.h.

◆ operator/() [2/2]

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

Definition at line 419 of file angles.h.

◆ operator/=()

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

Definition at line 385 of file angles.h.

◆ operator<()

bool argos::CDegrees::operator< ( const CDegrees c_degrees) const
inline

Definition at line 425 of file angles.h.

◆ operator<=()

bool argos::CDegrees::operator<= ( const CDegrees c_degrees) const
inline

Definition at line 429 of file angles.h.

◆ operator==()

bool argos::CDegrees::operator== ( const CDegrees c_degrees) const
inline

Definition at line 441 of file angles.h.

◆ operator>()

bool argos::CDegrees::operator> ( const CDegrees c_degrees) const
inline

Definition at line 433 of file angles.h.

◆ operator>=()

bool argos::CDegrees::operator>= ( const CDegrees c_degrees) const
inline

Definition at line 437 of file angles.h.

◆ SetValue()

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

Sets the value in degrees.

Parameters
f_valuethe wanted value in degrees

Definition at line 338 of file angles.h.

◆ SignedNormalize()

CDegrees& argos::CDegrees::SignedNormalize ( )
inline

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

Returns
A reference to the current object
See also
CRange

Definition at line 347 of file angles.h.

◆ UnsignedNormalize()

CDegrees& argos::CDegrees::UnsignedNormalize ( )
inline

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

Returns
A reference to the current object
See also
CRange

Definition at line 357 of file angles.h.

Friends And Related Function Documentation

◆ NormalizedDifference

CDegrees NormalizedDifference ( const CDegrees c_angle1,
const CDegrees c_angle2 
)
friend

Calculates the normalized difference between the given angles.

The difference is calculated as c_angle1 - c_angle2 and normalized in the range [-180,180].

Parameters
c_angle1The first angle
c_angle2The second angle
Returns
The smallest difference between the two angles

Definition at line 528 of file angles.h.

◆ operator*

CDegrees operator* ( Real  f_value,
const CDegrees c_degrees 
)
friend

Definition at line 408 of file angles.h.

◆ operator<<

std::ostream& operator<< ( std::ostream &  c_os,
const CDegrees c_degrees 
)
friend

Definition at line 458 of file angles.h.

◆ operator>>

std::istream& operator>> ( std::istream &  is,
CDegrees c_degrees 
)
friend

Definition at line 466 of file angles.h.

◆ ToRadians

CRadians ToRadians ( const CDegrees c_degrees)
friend

Converts this object to CRadians.

Returns
the conversion of m_fValue into CRadians
Parameters
c_degreesthe object to convert
Returns
the converted CRadians object

Definition at line 498 of file angles.h.