Home >>Java Math Methods >Java Math.tan() method
Java Math.tan() in Java Method is used to return the angle tangent in trigonometric.
public static double tan(double a)
a =This parameter is used for an angle, in radians
It is used to returns the tangent value of the argument.
public class MyClass
{
public static void main(String[] args)
{
double x = 60;
double y = Math.toRadians(x);
System.out.println(Math.tan(y));
}
}
public class MyClass
{
public static void main(String[] args)
{
double x = 0.0/0;
double y = Math.toRadians(x);
System.out.println(Math.tan(y));
}
}