Java Math acos() Method

Math Methods : Return the arc cosine of different numbers

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

Parameter Description
number Required. 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

❮ Math Methods