JavaScript asin() method

Definition and usage

asin() The method returns the arcsine of a number, the returned value is an angle in radians between -PI/2 and PI/2.

Note:If the parameter x If the value is outside the range of -1 to 1, the browser will return NaN.

Tip:1 will return the value of PI/2. -1 will return the value of -PI/2.

Example

Returns the arcsine of a number:

Math.asin(0.5);

Try it yourself

Syntax

Math.asin(x)

Parameter value

Parameter Description
x Required. Number.

Technical details

Return value: Numbers, from -PI/2 to PI/2, if the value is outside the range of -1 to 1, it returns NaN.
JavaScript version: ECMAScript 1

Browsertilstand

Math.asin() Er en ES1-funktion (JavaScript 1999). Alle browsere understøtter det fuldt ud:

Chrome IE Edge Firefox Safari Opera
Support Support Support Support Support Support

Relaterede sider

Tutorial:JavaScript matematik