Defines

trig.h File Reference

Go to the source code of this file.

Defines

#define  PI   ((float)3.1415926535)
  The constant Pi defined as float.
#define  TWOPI   ((float)6.283185307)
  Two times the constant Pi defined as a float.
#define  HALFPI   ((float)1.570796326794895)
  Half of the constant Pi defined as a float.
#define  DEG_TO_RAD   (PI/(float)180.0)
  The coefficient to convert the value of an angle in degrees into radians.
#define  RAD_TO_DEG   ((float)180.0/PI)
  The coefficient to convert the value of an angle in radians into degrees.
#define  DegToRad(deg)   (((float)deg)*DEG_TO_RAD)
  A function macro to convert degrees to radians with float precision.
#define  RadToDeg(rad)   (((float)rad)*RAD_TO_DEG)
  A function macro to convert radians to degrees with float precision.

Define Documentation

#define PI   ((float)3.1415926535)

The constant Pi defined as float.

Pi is the ratio of a circle's circumference to its diameter.

Definition at line 13 of file trig.h.

#define TWOPI   ((float)6.283185307)

Two times the constant Pi defined as a float.

Definition at line 15 of file trig.h.

#define HALFPI   ((float)1.570796326794895)

Half of the constant Pi defined as a float.

Definition at line 17 of file trig.h.

#define DEG_TO_RAD   (PI/(float)180.0)

The coefficient to convert the value of an angle in degrees into radians.

Definition at line 19 of file trig.h.

#define RAD_TO_DEG   ((float)180.0/PI)

The coefficient to convert the value of an angle in radians into degrees.

Definition at line 21 of file trig.h.

#define DegToRad (   deg )    (((float)deg)*DEG_TO_RAD)

A function macro to convert degrees to radians with float precision.

Definition at line 23 of file trig.h.

#define RadToDeg (   rad )    (((float)rad)*RAD_TO_DEG)

A function macro to convert radians to degrees with float precision.

Definition at line 25 of file trig.h.