Math.asin() Method - Math Functions

Math.asin() method of Math Functions in javascript.
How to get the arcsine value of a number in javascript?


Object: Math
Method: Math.asin()
Description: To get the arc sine value for a number, we use this function. The function returns a value between -PI/2 till PI/2 radians. The parameter for asin() function should be between -1 and 1, if it exceeds the limit it returns "NaN". The below example will get arcsine values for numbers 4, 0, 1 using Math Functions.


<script type="text/javascript">
document.write('Arcsine of 4 is::'+Math.asin(4));
document.write('Arcsine of 0 is::'+Math.asin(0));
document.write('Arcsine of 1 is::'+Math.asin(1));


In the above example,
  • Math.asin() method returns "NaN" for the number 4 as it exceeds the limit.
  • But for "0" the value returned is "0".
  • The arc sine value for 1 returned by Math.asin() method "1.57079".

Ask Questions

Ask Question