Math.toRadians()
Math.toRadians() returns the value after converting input degree number to radians.
Syntax
Math.toRadians(input_number)
Note that all input numbers are in degree.
Here are some examples.
System.out.println(Math.toRadians(180)); //3.141592653589793
System.out.println(Math.toRadians(90)); //1.5707963267948966
System.out.println(Math.toRadians(0)); //0.0
System.out.println(Math.toRadians(1.22)); //0.02129301687433082
System.out.println(Math.toRadians(-1.22)); //-0.02129301687433082
System.out.println(Math.toRadians(-120)); // -2.0943951023931953
« All Math functions
This article is written by plus2net.com team.
plus2net.com