03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Example<br />

The following example returns the angle, in radians, of the point specified by the coordinates<br />

(0, 10), such that x = 0 <strong>and</strong> y = 10. Note that the first parameter to atan2 is always the y<br />

coordinate.<br />

trace(Math.atan2(10, 0)); // output: 1.5707963267949<br />

See also<br />

acos (Math.acos method), asin (Math.asin method), atan (Math.atan method), cos<br />

(Math.cos method), sin (Math.sin method), tan (Math.tan method)<br />

ceil (Math.ceil method)<br />

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

Returns the ceiling of the specified number or expression. The ceiling of a number is the<br />

closest integer that is greater than or equal to the number.<br />

Parameters<br />

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

Returns<br />

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

Example<br />

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

Math.ceil(12.5);<br />

See also<br />

floor (Math.floor method), round (Math.round method)<br />

cos (Math.cos method)<br />

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

Computes <strong>and</strong> returns the cosine of the specified angle in radians. To calculate a radian, see<br />

the description of the Math class entry.<br />

Parameters<br />

x:Number - A number that represents an angle measured in radians.<br />

382 ActionScript classes

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

Saved successfully!

Ooh no, something went wrong!