acos
Summary
Get the arccosine of a number.
Usage
public static double acos(double x)
Returns
The arccosine of the number expressed in radians. The
returned value will be between 0 and π (inclusive). The
result is NaN
if the provided argument is out of range.
Parameters
- x
The number to get the arccosine of.
Description
Returns the arccosine (in radians) for a number within the range
[-1, 1]
(inclusive). If the provided number is out of range, NaN
will be returned.
Examples
1 2 3 4 5 6 | import System; Console.log(Math.acos(-2)); // NaN Console.log(Math.acos(-1)); // 3.141592653589793 Console.log(Math.acos(0.5)); // 1.0471975511965979 Console.log(Math.acos(1)); // 0 |
Share
HTML | BBCode | Direct Link