.acos()
StevenSwiniarski474 total contributions
Published Jun 18, 2021Updated Aug 24, 2022
Contribute to Docs
The Math.acos()
method returns the inverse cosine (or arccosine) of the argument in radians.
Syntax
Math.acos(n)
n
is a double
between 0 and 1.
Example
The following example uses Math.acos()
to return the inverse cosine of 0.0
and 1.0
:
class Main {public static void main(String[] args) {double arg1 = 0.0;double arg2 = 1.0;System.out.println(Math.acos(arg1));System.out.println(Math.acos(arg2));}}
This will produce the following output:
1.57079632679489660.0
All contributors
- StevenSwiniarski474 total contributions
- Victoria-DR22 total contributions
- christian.dinh2476 total contributions
- Anonymous contributorAnonymous contributor3071 total contributions
- StevenSwiniarski
- Victoria-DR
- christian.dinh
- Anonymous contributor
Looking to contribute?
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.