Math.PI
Previous  Top  Next

Syntax
Math.PI

Arguments
None.

Returns
The constant PI.

Description
Returns the mathematical constant PI.
PI is the ratio of the circumferene of a circle to its diameter.
This is an irrational number and has the approximate value of 3.141592.

Sample
rad = deg * 2 * Math.PI / 360;   // converts deg to radians