Javatpoint Logo
Javatpoint Logo

Java Math.atan() method

The java.lang.Math.atan() is used to calculate the trigonometric Arc Tangent of an angle. Arc Tangent is also called as inverse of a tangent. This method returns the values between -pi/2 and pi/2.

Syntax

Parameter

Return

  • If the argument is positive or negative number, this method will return the Arc Tangent value.
  • If the argument is NaN, this method will return NaN.
  • If the argument is Zero, this method will return Zero with the same sign as the argument.

Example 1

Test it Now

Output:

1.4125642791467878

Example 2

Test it Now

Output:

-0.7853981633974483

Example 3

Test it Now

Output:

0.0

Example 4

Test it Now

Output:

1.2626272556789115

Example 5

Test it Now

Output:

NaN

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