1 Public classMathdemo {2 Public Static voidMain (string[] args) {3 4 DoubleTan = Math.tan (Math.PI * 45/180);//angle of Tan5 DoubleAA = Math.atan (1) * 180/MATH.PI;//according to Tan angle of request6 Doubledegrees = Math.todegrees (Math.PI);//according to the arc length to seek the angle7 Doubleradians = Math.toradians (180);//arc length based on angle8 System.out.println (tan);9 System.out.println (AA);Ten System.out.println (degrees); One System.out.println (radians); A } - -}
Some information is available on the Internet, and there is no detailed description of this piece. You can apply it according to the code above. The angle in math, the conversion of radians should be calculated based on a circle with a radius of 1.
The parameter in tan () is the arc length of the angle. Not the angle. Need attention!
Math and angle, arc length, tan and other related algorithms