asin (JavaScript)

Gets the inverse sine of an angle.

Defined in

Math (JavaScript)

Syntax

asin(value:double) : double
Parameter Description
value The sine of an angle; that is, the ratio of the adjacent side to the hypotenuse. See below for special cases.
Return value Description
double The inverse sine of the parameter in radians. See rad (JavaScript) to convert degrees to radians.

Usage

Special cases are as follows:
  • The inverse sine of NaN or an absolute value greater than 1 is NaN.
  • The inverse sine of +0 is positive zero.
  • The inverse sine of -0 is negative zero.

Examples

This button onclick event calculates an angle in degrees of a right triangle given the length of the adjacent side and the length of the hypotenuse.
sessionScope.angleA = 
	Math.deg(Math.asin(sessionScope.a / sessionScope.h))