JavaScript asin() method
Example
Return the arcsine of a number:
Math.asin(0.5);
Output result:
Try it »
Definition and Usage
The asin() method returns an angle in radians between -PI/2 and PI/2.
Note: If the parameter x is outside the range -1.0 ~ 1.0, the browser will return NaN.
Tip: If the parameter x is 1, then PI/2 is returned.
Browser support





All major browsers support the asin() method.
Syntax
Math.asin(
x
)
Parameter value
| Parameters | Description |
|---|---|
| x | Required. Must be a numeric value between -1.0 and 1.0. |
Return Value
| Type | Description |
|---|---|
| Number | The arcsine of x. The returned value is an angle in radians between -PI/2 and PI/2. |
Technical Details
| JavaScript version: | 1.0 |
|---|
JavaScript Math object