angles.cpp
Go to the documentation of this file.
1 
7 #include "angles.h"
8 
9 namespace argos {
10 
11  const CRadians CRadians::PI(ARGOS_PI);
12  const CRadians CRadians::TWO_PI(2.0f * CRadians::PI);
13  const CRadians CRadians::PI_OVER_TWO(CRadians::PI / 2.0f);
14  const CRadians CRadians::PI_OVER_THREE(CRadians::PI / 3.0f);
15  const CRadians CRadians::PI_OVER_FOUR(CRadians::PI / 4.0f);
16  const CRadians CRadians::PI_OVER_SIX(CRadians::PI / 6.0f);
17  const CRadians CRadians::ZERO;
18 
19  const CRange<CRadians> CRadians::SIGNED_RANGE(-CRadians::PI, CRadians::PI);
20  const CRange<CRadians> CRadians::UNSIGNED_RANGE(CRadians(), CRadians::TWO_PI);
21  const Real CRadians::RADIANS_TO_DEGREES(180.0/CRadians::PI.GetValue());
22 
23  const CRange<CDegrees> CDegrees::SIGNED_RANGE(CDegrees(-180.0), CDegrees(180.0));
24  const CRange<CDegrees> CDegrees::UNSIGNED_RANGE(CDegrees(0.0), CDegrees(360.0));
25  const Real CDegrees::DEGREES_TO_RADIANS(CRadians::PI.GetValue()/180.0);
26 
27 }
static const CRange< CRadians > UNSIGNED_RANGE
The unsigned normalization range [0:TWO_PI].
Definition: angles.h:274
float Real
Collects all ARGoS code.
Definition: datatypes.h:39
static const CRange< CRadians > SIGNED_RANGE
The signed normalization range [-PI:PI].
Definition: angles.h:273
static const CRadians TWO_PI
Set to PI * 2.
Definition: angles.h:54
static const CRadians PI_OVER_FOUR
Set to PI / 4.
Definition: angles.h:69
static const Real RADIANS_TO_DEGREES
Constant to convert from radians to degrees.
Definition: angles.h:275
static const CRadians PI
The PI constant.
Definition: angles.h:49
static const CRadians PI_OVER_SIX
Set to PI / 6.
Definition: angles.h:74
static const CRadians ZERO
Set to zero radians.
Definition: angles.h:79
#define ARGOS_PI
To be used when initializing static variables.
Definition: angles.h:32
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
static const CRadians PI_OVER_THREE
Set to PI / 3.
Definition: angles.h:64
static const CRadians PI_OVER_TWO
Set to PI / 2.
Definition: angles.h:59