3ds Max C++ API Reference
Loading...
Searching...
No Matches
trig.h File Reference

Macros

#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   (0.017453292f /* Mimic 2019 behavior (PI / 180.0) */)
 The coefficient to convert the value of an angle in degrees into radians.
 
#define RAD_TO_DEG   (57.2957802f /* Mimic 2019 behavior (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.
 

Macro Definition Documentation

◆ PI

#define PI   ((float)3.1415926535)

The constant Pi defined as float.

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

◆ TWOPI

#define TWOPI   ((float)6.283185307)

Two times the constant Pi defined as a float.

◆ HALFPI

#define HALFPI   ((float)1.570796326794895)

Half of the constant Pi defined as a float.

◆ DEG_TO_RAD

#define DEG_TO_RAD   (0.017453292f /* Mimic 2019 behavior (PI / 180.0) */)

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

◆ RAD_TO_DEG

#define RAD_TO_DEG   (57.2957802f /* Mimic 2019 behavior (180.0 / PI) */)

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

◆ DegToRad

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

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

◆ RadToDeg

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

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