Javatpoint Logo
Javatpoint Logo

Java Math.acos() method

The java.lang.Math.acos() is used to calculate the trigonometric Arc Cosine of an angle. Arc cosine is also called as inverse of a cosine. This method returns the values between 0.0 and pi.

Syntax

Parameter

Return

  • If the argument is positive or negative number, this method will return the Arc cosine value.
  • If the argument is NaN or outside the range -1 and 1, this method will return NaN.

Example 1

Test it Now

Output:

0.0

Example 2

Test it Now

Output:

3.141592653589793

Example 3

Test it Now

Output:

NaN

Example 4

Test it Now

Output:

NaN

Example 5

Test it Now

Output:

1.5159376794536454

Next TopicJava Math





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA