Math.asin

asin — Returns the arc-sine (in radians) of a number.

Description

Math.asin(number number)

Parameters

Name Description Type Default Optional
number A number between -1 and 1. number No

Examples

Example #1 – asin example
console.log(Math.asin(0.5)); // 0.5235987755982989 console.log(Math.asin(4)); // NaN console.log(Math.asin(1)); // 1.5707963267948966 console.log(Math.asin(-1)); // -1.5707963267948966 console.log(Math.asin(0)); // 0

External references