trig.h File Reference
 
 
 
trig.h File Reference

This reference page is linked to from the following overview topics: A Matrix3 as an Axis System, Computing Vertex Normals by Weighting.


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.

#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.