[Positioner] Add PosUtil::deg2rad()
This commit is contained in:
parent
90fc329f82
commit
88a90a7abd
|
@ -23,6 +23,12 @@ using std::tr1::unordered_map ;
|
|||
/* *** Maths *** */
|
||||
|
||||
|
||||
double PosUtil::deg2rad(const double °rees)
|
||||
{
|
||||
return degrees / (180.0 / M_PI) ;
|
||||
}
|
||||
|
||||
|
||||
double PosUtil::rad2deg(const double &radians)
|
||||
{
|
||||
return radians * (180.0 / M_PI) ;
|
||||
|
|
|
@ -22,7 +22,9 @@ public:
|
|||
|
||||
/** @name Maths */
|
||||
//@{
|
||||
/// Return the degree value of \em radians
|
||||
/// Returns the radian value of \em degrees
|
||||
static double deg2rad(const double °rees) ;
|
||||
/// Returns the degree value of \em radians
|
||||
static double rad2deg(const double &radians) ;
|
||||
/// Checks if \em value is in the interval [center-width;center+width]
|
||||
static bool is_in_interval(float center, float bound, float value) ;
|
||||
|
|
Loading…
Reference in New Issue