Returns the arcsine (in radians) of a number.
Method of Math
Static
Syntax
asin( x )
Parameters
Parameter | Description |
---|---|
x | A number |
Description
The asin method returns a numeric value between -pi/2 and pi/2 radians. If the value of number is outside this range, it returns NaN.
Because asin is a static method of Math, you always use it as Math.asin(), rather than as a method of a Math object you created.
Examples
The following function returns the arcsine of the variable x:
If you pass getAsin the value 1, it returns 1.570796326794897 (pi/2); if you pass it the value 2, it returns NaN because 2 is out of range.
See also
Math.acos, Math.atan, Math.atan2, Math.cos, Math.sin, Math.tan