offline version v3


45 of 264 menu

Math.asin method

The Math.asin method returns the arcsine (or inverse sine) of a number. The parameter must be between -1 and 1, otherwise NaN will be returned.

Syntax

Math.asin(number);

Example

Let's output the arcsine of the number 0.45.

console.log(Math.asin(0.45));

The code execution result:

0.4667653390472964

Example

Let's output the arcsine of the number -1:

console.log(Math.asin(-1));

The code execution result:

-1.5707963267948966

Example

Let's output the arcsine of the number 45. Since the parameter is greater than 1, NaN will be returned:

console.log(Math.asin(45));

The code execution result:

NaN

See also

  • the Math.cos method
    that returns the cosine of a number
  • the Math.sin method
    that returns the sine of a number
  • the Math.tan method
    that returns the tangent of a number
  • the Math.acos method
    that returns the arccosine of a number
  • the Math.atan method
    that returns the arctangent of a number
enru