Check out example codes for "how to use math.tan in java". It will help you in understanding the concepts better.
Code Example 1
// Java program to demonstrate working
// of java.lang.Math.tan() method
import java.lang.Math;
class Gfg {
// driver code
public static void main(String args[])
{
double a = 30;
// converting values to radians
double b = Math.toRadians(a);
System.out.println(Math.tan(b));
a = 45;
// converting values to radians
b = Math.toRadians(a);
System.out.println(Math.tan(b));
a = 60;
// converting values to radians
b = Math.toRadians(a);
System.out.println(Math.tan(b));
a = 0;
// converting values to radians
b = Math.toRadians(a);
System.out.println(Math.tan(b));
}
}
Learn ReactJs, React Native from akashmittal.com