Haptic Controller
Loading...
Searching...
No Matches
angles.hpp File Reference

Go to the source code of this file.

Enumerations

enum  AngleUnits { RADIANS =0 , DEGREES =2 , REVS =3 }
 Possible angle units, radians, degrees, revolutions. More...
 

Functions

constexpr float convert_angular_units (float ang, const AngleUnits curr_unit, const AngleUnits desr_unit)
 Converts an angle from one unit to another.
 
constexpr Limits< float > convert_angular_units (const Limits< float > &angLimits, const AngleUnits curr_unit, const AngleUnits desr_unit)
 Converts a limit from one unit to another.
 

Enumeration Type Documentation

◆ AngleUnits

enum AngleUnits

Possible angle units, radians, degrees, revolutions.

Enumerator
RADIANS 
DEGREES 
REVS 

Definition at line 7 of file angles.hpp.

Function Documentation

◆ convert_angular_units() [1/2]

Limits< float > convert_angular_units ( const Limits< float > & angLimits,
const AngleUnits curr_unit,
const AngleUnits desr_unit )
constexpr

Converts a limit from one unit to another.

Parameters
angLimitsThe limit to convert.
curr_unitThe unit to convert from.
desr_unitThe unit to convert to.

Definition at line 47 of file angles.hpp.

References DEGREES, Limits< T >::lower, RADIANS, REVS, and Limits< T >::upper.

◆ convert_angular_units() [2/2]

float convert_angular_units ( float ang,
const AngleUnits curr_unit,
const AngleUnits desr_unit )
constexpr

Converts an angle from one unit to another.

Parameters
angThe angle to convert.
curr_unitThe unit to convert from.
desr_unitThe unit to convert to.

Definition at line 18 of file angles.hpp.

References DEGREES, RADIANS, and REVS.

Referenced by updateAndSendSystemInfo().