asin Function

Top  Previous  Next

Returns the arcsine of a number as a value between -PI/2 and PI/2 radians.

Syntax

Math.asin(number)

Arguments

numberA number.        

Return Value

A number, from -PI/2 to PI/2, if the argument is within the range -1 to 1; otherwise, NaN.

Examples

Math.asin(1);      // Returns 1.570796

Math.asin(0.5);    // Returns 0.5235988

Math.asin(0);      // Returns 0

Math.asin(-0.5);   // Returns -0.5235988

Math.asin(-1);     // Returns -1.570796

See also

Math.acos