JavaScript asin()Method

Math 对象参考手册JavaScript Math Object

Examples

Return the arcsine of a number:

Math.asin(0.5);

Output:


Try it Yourself »

Definition and Usage

The asin() method returns the arc sine in radians between -PI/2 and PI/2.

Note:If the parameter x exceeds the range of -1.0 to 1.0, the browser will return NaN.

Tip:If the parameter x is 1, then PI/2 will be returned.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the asin() method


Syntax

Math.asin(x)

Parameter Values

Parameter Description
x Required. Must be a number, with a value between -1.0 and 1.0.

Return Value

Type Description
Number The arcsine of x. The returned value is in radians between -PI/2 and PI/2.

Technical Details

JavaScript Version: 1.0


Math 对象参考手册JavaScript Math Object

Other Extensions