Math.toDegrees()
Math.toDegrees() returns the value after converting input radian number to degree.
Syntax
Math.toDegrees(input_number)
Note that all input numbers are in Radians.
Here are some examples.
System.out.println(Math.toDegrees(Math.PI)); //180.0
System.out.println(Math.toDegrees(Math.PI/2)); //90.0
System.out.println(Math.toDegrees(2)); //114.59155902616465
System.out.println(Math.toDegrees(1.22)); //69.90085100596043
System.out.println(Math.toDegrees(-1.22)); //-69.90085100596043
System.out.println(Math.toDegrees(0)); // 0.0
« All Math functions
« Java
This article is written by plus2net.com team.
plus2net.com