EasyManua.ls Logo

MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE - Atan2 (Math.atan2 Method); Ceil (Math.ceil Method)

MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE
780 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
416 ActionScript classes
atan2 (Math.atan2 method)
public static atan2(y:Number, x:Number) : Number
Computes and returns the angle of the point y/x in radians, when measured counterclockwise
from a circle's x axis (where 0,0 represents the center of the circle). The return value is
between positive pi and negative pi.
Availability: ActionScript 1.0; Flash Lite 2.0 - In Flash Player 4, the methods and properties
of the Math class are emulated using approximations and might not be as accurate as the non-
emulated math functions that Flash Player 5 supports.
Parameters
y:Number - A number specifying the y coordinate of the point.
x:Number - A number specifying the x coordinate of the point.
Returns
Number - A number.
Example
The following example returns the angle, in radians, of the point specified by the coordinates
(0, 10), such that x = 0 and y = 10. Note that the first parameter to atan2 is always the y
coordinate.
trace(Math.atan2(10, 0)); // output: 1.5707963267949
See also
acos (Math.acos method), asin (Math.asin method), atan (Math.atan method), cos
(Math.cos method)
, sin (Math.sin method), tan (Math.tan method)
ceil (Math.ceil method)
public static ceil(x:Number) : Number
Returns the ceiling of the specified number or expression. The ceiling of a number is the
closest integer that is greater than or equal to the number.
Availability: ActionScript 1.0; Flash Lite 2.0 - In Flash Player 4, the methods and properties
of the Math class are emulated using approximations and might not be as accurate as the non-
emulated math functions that Flash Player 5 supports.
Parameters
x:Number - A number or expression.

Table of Contents

Related product manuals