Quirrel4.41.0

math.PI

Defined in module "math"
from "math" import PI
PI = 3.14159 (float)

The ratio of a circle's circumference to its diameter, for converting between radians and degrees and for angle math in general.

Notes

Every trig function in math takes and returns radians, not degrees, so a degree value needs degrees * PI / 180 before it reaches sin, cos, tan, or their inverses.

The value comes straight from the C M_PI macro, cast to SQFloat.

See also

sinReturns the sine of x (in radians)
cosReturns the cosine of x (in radians)
atan2Returns the arctangent of y/x using the signs to determine the quadrant
mathmodule index