Gazebo Math

API Reference

7.5.1
gz/math/Angle.hh File Reference
#include <istream>
#include <ostream>
#include <gz/math/Helpers.hh>
#include <gz/math/config.hh>

Go to the source code of this file.

Classes

class  Angle
 The Angle class is used to simplify and clarify the use of radians and degrees measurements. A default constructed Angle instance has a value of zero radians/degrees. More...
 

Namespaces

 gz
 
 gz::math
 

Macros

#define GZ_DTOR(d)   ((d) * GZ_PI / 180)
 Converts degrees to radians. More...
 
#define GZ_NORMALIZE(a)   (atan2(sin(a), cos(a)))
 Macro that normalizes an angle in the range -Pi to Pi. More...
 
#define GZ_RTOD(r)   ((r) * 180 / GZ_PI)
 Macro that converts radians to degrees. More...
 

Macro Definition Documentation

◆ GZ_DTOR

#define GZ_DTOR (   d)    ((d) * GZ_PI / 180)

Converts degrees to radians.

Parameters
[in]ddegrees
Returns
radians

◆ GZ_NORMALIZE

#define GZ_NORMALIZE (   a)    (atan2(sin(a), cos(a)))

Macro that normalizes an angle in the range -Pi to Pi.

Parameters
[in]aangle
Returns
the angle, in range

◆ GZ_RTOD

#define GZ_RTOD (   r)    ((r) * 180 / GZ_PI)

Macro that converts radians to degrees.

Parameters
[in]rradians
Returns
degrees