03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Parameters<br />

x:Number - The exponent; a number or expression.<br />

Returns<br />

Number - A number.<br />

Example<br />

The following example displays the logarithm for two number values.<br />

trace(Math.exp(1)); // output: 2.71828182845905<br />

trace(Math.exp(2)); // output: 7.38905609893065<br />

See also<br />

E (Math.E property)<br />

floor (Math.floor method)<br />

public static floor(x:Number) : Number<br />

Returns the floor of the number or expression specified in the parameter x. The floor is the<br />

closest integer that is less than or equal to the specified number or expression.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 5 - In Flash Player 4, the methods <strong>and</strong> properties<br />

of the Math class are emulated using approximations <strong>and</strong> might not be as accurate as the nonemulated<br />

math functions that Flash Player 5 supports.<br />

Parameters<br />

x:Number - A number or expression.<br />

Returns<br />

Number - The integer that is both closest to, <strong>and</strong> less than or equal to, parameter x.<br />

Example<br />

The following code returns a value of 12:<br />

Math.floor(12.5);<br />

The following code returns a value of -7:<br />

Math.floor(-6.5);<br />

760 <strong>ActionScript</strong> classes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!