28 #define GZ_RTOD(r) ((r) * 180 / M_PI)
33 #define GZ_DTOR(d) ((d) * M_PI / 180)
38 #define GZ_NORMALIZE(a) (atan2(sin(a), cos(a)))
71 public:
Angle(
double _radian);
78 public:
virtual ~
Angle();
82 public:
void SetFromRadian(
double _radian);
86 public:
void SetFromDegree(
double _degree);
90 public:
double Radian()
const;
94 public:
double Degree()
const;
97 public:
void Normalize();
101 public:
inline double operator*()
const {
return value; }
105 public:
Angle operator-(
const Angle &_angle)
const;
110 public:
Angle operator+(
const Angle &_angle)
const;
115 public:
Angle operator*(
const Angle &_angle)
const;
120 public:
Angle operator/(
const Angle &_angle)
const;
125 public:
Angle operator-=(
const Angle &_angle);
130 public:
Angle operator+=(
const Angle &_angle);
135 public:
Angle operator*=(
const Angle &_angle);
140 public:
Angle operator/=(
const Angle &_angle);
145 public:
bool operator ==(
const Angle &_angle)
const;
150 public:
bool operator!=(
const Angle &_angle)
const;
155 public:
bool operator<(
const Angle &_angle)
const;
160 public:
bool operator<=(
const Angle &_angle)
const;
165 public:
bool operator>(
const Angle &_angle)
const;
170 public:
bool operator>=(
const Angle &_angle)
const;
191 _in.setf(std::ios_base::skipws);
197 private:
double value;
friend std::ostream & operator<<(std::ostream &_out, const gazebo::math::Angle &_a)
Stream insertion operator.
Definition: Angle.hh:176
static const Angle Pi
math::Angle(M_PI)
Definition: Angle.hh:58
friend std::istream & operator>>(std::istream &_in, gazebo::math::Angle &_a)
Stream extraction operator.
Definition: Angle.hh:187
double operator*() const
Dereference operator.
Definition: Angle.hh:101
static const Angle TwoPi
math::Angle(M_PI * 2)
Definition: Angle.hh:64
static const Angle Zero
math::Angle(0)
Definition: Angle.hh:55
double Radian() const
Get the angle in radians.
static const Angle HalfPi
math::Angle(M_PI * 0.5)
Definition: Angle.hh:61
An angle and related functions.
Definition: Angle.hh:52
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48