VOOZH about

URL: https://www.geeksforgeeks.org/java/java-toradians-method-example/

⇱ Java toRadians() method with Example - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Java toRadians() method with Example

Last Updated : 11 Aug, 2021

The java.lang.Math.toRadians() is used to convert an angle measured in degrees to an approximately equivalent angle measured in radians. 
Note: The conversion from degrees to radian is generally inexact.
 

Syntax:  

public static double toRadians(double deg)

Parameter:
deg : This parameter is an angle in degrees which
we want to convert in radians.
Return :
This method returns the measurement of the angle 
deg in radians.


Example: To show working of java.lang.Math.toRadians() method. 

Output: 

3.141592653589793
1.5707963267948966
0.7853981633974483
Comment
Article Tags: