PIUsage-- Lingo syntax PI // JavaScript syntax Math.PI DescriptionConstant; returns the value of pi (p), the ratio of a circle’s circumference to its diameter, as a floating-point number. The value is rounded to the number of decimal places set by the
ExampleThis statement uses the
-- Lingo syntax vRadius = 3 vArea = PI*power(vRadius, 2) trace(vArea) -- results in 28.2743 // JavaScript syntax var vRadius = 3; vArea = Math.PI*Math.pow(vRadius, 2); trace(vArea); // results in 28.274333882308138 |
Íàçàä |