JavaScript asin() method

Definition and usage

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

Comment: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 inverse sine 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

Webbläsarstöd

Math.asin() Är ES1-funktioner (JavaScript 1999). Alla webbläsare stöder det fullt ut:

Chrome IE Edge Firefox Safari Opera
Stöd Stöd Stöd Stöd Stöd Stöd

Relaterade sidor

Tutorial:JavaScript matematik