Here you can find the source of tanD(double arg)
static final public double tanD(double arg)
//package com.java2s; //License from project: Apache License public class Main { static final public double tanD(double arg) { arg = Math.IEEEremainder(arg, 360.0); // check for infinity cases if (arg / 90.0 == 1.0) return Double.POSITIVE_INFINITY; else if (arg / 90.0 == -1.0) return Double.NEGATIVE_INFINITY; else/*from w w w .j a v a 2s .c o m*/ return Math.tan(Math.toRadians(arg)); } }