bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/Java/Java Reference
Java•Java Reference

Java Math atan() Method

❮ Math Methods

Example

System.out.println(Math.atan(0.5));
System.out.println(Math.atan(-0.5));
System.out.println(Math.atan(5));
System.out.println(Math.atan(-5));
System.out.println(Math.atan(100));
System.out.println(Math.atan(-100));

Definition and Usage

The atan() method returns the arc tangent of a number in radians.

Tip

The atan() method only returns angles between -PI/2 and PI/2. The atan2() method can return any angle.

Syntax

public static double atan(double
number )

Parameter Values

ParameterDescription
numberRequired. A number to find the arc tangent of.

Technical Details

Returns:A double value representing the arc tangent of a number in radians.
Java version:Any

Previous

Java Math asin() Method

Next

Java Math atan2() Method