Math.asin()

Math.asin(x) → number

Returns the arcsine of x.

Returns the angle, in radians, whose sine is x. The result is in the range -π/2 to π/2. Returns NaN if x is outside -1 to 1.

Arguments

NameTypeRequiredDefaultDescription
x number optional — A number between -1 and 1.

Returns

number The arcsine of x, in radians.

Example

let a = Math.asin(1); // 1.5707963267948966