Gazebo Math

API Reference

6.15.1
gz/math/Angle.hh File Reference
#include <iostream>
#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

 ignition
 
 ignition::math
 Math classes and function useful in robot applications.
 

Macros

#define IGN_DTOR(d)   ((d) * IGN_PI / 180)
 Converts degrees to radians. More...
 
#define IGN_NORMALIZE(a)   (atan2(sin(a), cos(a)))
 Macro that normalizes an angle in the range -Pi to Pi. More...
 
#define IGN_RTOD(r)   ((r) * 180 / IGN_PI)
 Macro that converts radians to degrees. More...
 

Macro Definition Documentation

◆ IGN_DTOR

#define IGN_DTOR (   d)    ((d) * IGN_PI / 180)

Converts degrees to radians.

Parameters
[in]ddegrees
Returns
radians

◆ IGN_NORMALIZE

#define IGN_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

◆ IGN_RTOD

#define IGN_RTOD (   r)    ((r) * 180 / IGN_PI)

Macro that converts radians to degrees.

Parameters
[in]rradians
Returns
degrees