Math.acos()
Signature
double acos (double a)
Description
Returns the arc cosine of an angle, in the range of 0.0 through
pi. Special case:
If the argument is NaN or its absolute value is greater
than 1, then the result is NaN.
A result must be within 1 ulp of the correctly rounded result. Results
must be semi-monotonic.
Parameters
Name | Type | Description |
a | double | The value whose arc cosine is to be returned. |
Returns
Type | Description |
double | The arc cosine of the argument. |
Example
String result = String.valueOfDouble (Math.acos (0.5));
Result is: result contains: "1.0471975511965979"