Latest web development tutorials

JavaScript asin () method

Math Object Reference JavaScript Math Object

Examples

Returns the arcsine of a number:

Math.asin(0.5);

Output:


try it"

Definition and Usage

asin () method returns -PI / 2 to PI radians / 2 between.

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

Tip: If the value of the parameter x 1, then return to PI / 2.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support asin () method


grammar

Math.asin( x )

Parameter Value

参数 描述
x 必需。必须是一个数值,该值介于 -1.0 ~ 1.0 之间。

return value

类型 描述
Number x 的反正弦值。返回的值是 -PI/2 到 PI/2 之间的弧度值。

technical details

JavaScript version: 1.0


Math Object Reference JavaScript Math Object