bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/Java/Java Reference
Java•Java Reference

Java Math acos() Method

❮ Math Methods

Example

System.out.println(Math.acos(0.64));
System.out.println(Math.acos(-0.4));
System.out.println(Math.acos(0));
System.out.println(Math.acos(1));
System.out.println(Math.acos(-1));
System.out.println(Math.acos(2));

Definition and Usage

The acos() method returns the arc cosine value of a number.

Tip

acos(-1) returns the value of PI.

Syntax

public static double abs(double
number )

Parameter Values

ParameterDescription
numberRequired. A number to find the arc cosine of, in the range -1 to 1. If the value is outside -1 to 1, it returns NaN (Not a Number).

Technical Details

Returns:A double value, representing the arc cosine of a number

Previous

Java Math abs() Method

Next

Java Math addExact() Method