Gets the inverse cosine of an angle.
Parameter |
Description |
value |
The cosine of an angle; that is, the ratio of
the opposite side to the hypotenuse. See below for special cases. |
Return value |
Description |
double |
The inverse cosine of the parameter in radians.
See rad (JavaScript) to
convert degrees to radians. |
Usage
Special cases are as follows:
- The inverse cosine of
NaN
or an absolute value
greater than 1 is NaN.
Examples
This button
onclick
event
calculates an angle in degrees of a right triangle given the length
of the opposite side and the length of the hypotenuse.
sessionScope.angleA =
Math.deg(Math.acos(sessionScope.b / sessionScope.h))