Javatpoint Logo
Javatpoint Logo

Java Math.tan() method

The java.lang.Math.tan() is used to return the trigonometric tangent of an angle.

Syntax

Parameter

Return

  • If the argument is positive or negative number, this method will return the Tangent value.
  • If the argument is NaN or infinity, 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:

0.9999999999999999

Example 2

Test it Now

Output:

1.7320508075688767

Example 3

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