Math.PI Property

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
Math.PI Property Flash 5; can be used when exporting Flash 4 movies

the ratio of a circle's circumference to its diameter, approximately 3.14159
Math.PI

Description

The PI property represents the constant figs/u03c0.gif, the ratio of the circumference of a circle to its diameter.

Example

Math.PI is famously used in calculating the area of a circle:

function circleArea (radius) {   // PI times the radius squared can also be written   // as Math.PI * Math.pow(radius, 2)   return Math.PI * (radius * radius); }

See Also

Math.cos( ), Math.sin( )



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net