asin (Math.asin method)

public static asin(x:Number) : Number

Computes and returns the arc sine for the number specified in the parameter x, in radians.

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 from -1.0 to 1.0.

Returns

Number - A number between negative pi divided by 2 and positive pi divided by 2.

Example

The following example displays the arc sine for several values.

trace(Math.asin(-1)); // output: -1.5707963267949
trace(Math.asin(0)); // output: 0
trace(Math.asin(1)); // output: 1.5707963267949

See also

acos (Math.acos method), atan (Math.atan method), atan2 (Math.atan2 method), cos (Math.cos method), sin (Math.sin method), tan (Math.tan method)