English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Math.asin()The method returns the inverse sine of a number (in radians).
If the value of the passed parameter is-1to1outside the range, the method will return NaN.
Because asin() is a static method of Math, you always use it asMath.asin(), rather than used as a method of creating a Math object.
Math.asin(x)
Math.asin(0.)9);Test and see‹/›
All browsers fully support the Math.asin() method:
Method | |||||
Math.asin() | is | is | is | is | is |
Parameter | Description |
---|---|
x | Value |
Return value: | The inverse sine (in radians) of a given number is-1and1between; otherwiseNaN |
---|---|
JavaScript version: | ECMAScript 1 |
For less than-1or greater1The value, Math.asin() returns NaN:
Math.asin(-2); // NaN Math.asin(-1); // -1.5707963267948966 (-pi/2) Math.asin(0.);// 0 Math.asin(0.)5); // 0.5235987755982989 Math.asin(1);// 1.5707963267948966 (pi/2) Math.asin(2);// NaNTest and see‹/›