StrictMath toRadians() Method in Java Last Updated : 11 Oct, 2018 Summarize Comments Improve Suggest changes Share Like Article Like Report The java.lang.StrictMath.toRadians() method of StrictMath class in Java is used to accept an angle measured in degrees as a parameter and returns its approximately equivalent angle measured in radians. So basically it converts degree to radians. This conversion is generally inexact. Syntax: public static double toRadians(double deg) Parameters: This function accepts a single parameter deg which refers to an angle in degrees which is to be converted to its equivalent radians. Return Values: This method returns the measurement of the angle passed as a parameter, in radians. Examples: Input : 120 Output : 2.0943951023931953 Input : 0.00087104 Output : 1.5202515916571408E-5 Below programs illustrate the java.lang.StrictMath.toRadians() method in Java : Program 1: Java // Java Program to illustrate // StrictMath.toRadians() function import java.io.*; import java.lang.*; class GFG { public static void main(String[] args) { double deg = 108.478; double rad = StrictMath.toRadians(deg); System.out.println("Value in radian of " + deg + " degrees is " + rad); } } Output: Value in radian of 108.478 degrees is 1.8932982659784086 Program 2: Java // Java Program to illustrate StrictMath.toRadians() // function import java.io.*; import java.lang.*; class GFG { public static void main(String[] args) { double deg = 360.0; double rad = StrictMath.toRadians(deg); System.out.println("Value in radian of " + deg + " degrees is " + rad); } } Output: Value in radian of 360.0 degrees is 6.283185307179586 Reference: https://docs.oracle.com/javase/8/docs/api/java/lang/StrictMath.html#toRadians() Comment More infoAdvertise with us Next Article StrictMath atan() Method in Java R RICHIK BHATTACHARJEE Follow Improve Article Tags : Misc Java Java-lang package Java-Functions Java-StrictMath +1 More Practice Tags : JavaMisc Similar Reads StrictMath tan() Method in Java The java.lang.StrictMath.tan() is an in-built function in Java which returns the trigonometric tangent of an angle. Syntax: public static double tan(double ang) Parameters: This function accepts a single parameter ang which is a double variable representing an angle (in radians) whose trigonometric 2 min read StrictMath tanh() Method in Java The java.lang.StrictMath.tanh() method is used to return the hyperbolic tan of a double value passed as parameter to the function. The hyperbolic tan of x is defined by the formula $(e^x-e^{-x})/(e^x+e^{-x})$ where e denotes the Euler's number. Syntax: public static double tanh(double x) Parameters: 2 min read StrictMath toDegrees() Method in Java The java.lang.StrictMath.toDegrees() method of StrictMath class in Java is used to accept an angle measured in radians as a parameter and returns its approximately equivalent angle measured in degrees. So basically it converts radians to degrees. This conversion is generally inexact. Syntax: public 2 min read StrictMath sin() Method in Java The java.lang.StrictMath.sin() is an in-built function in Java which returns the trigonometric sine of an angle. Syntax: public static double sin(double ang) Parameters: This function accepts a single parameter ang which is a double variable which represents an angle (in radians) whose trigonometric 2 min read StrictMath atan() Method in Java The java.lang.StrictMath.atan() is an inbuilt method of StrictMath class which is used to return the tangent of a given argument. It returns the angle is within the range of -pi/2 and pi/2. It gives rise to two special results: The output is NaN if the passed parameter is a NaN. If the passed argume 2 min read StrictMath sinh() Method in Java The java.lang.StrictMath.sinh() method is used to return the hyperbolic sine of a double value passed as parameter to the function. The hyperbolic sine of x is defined by the formula $(e^x-e^-x)/2$ where e denotes Euler's number Syntax: public static double sinh(double x) Parameters:The function acc 2 min read Like