Tutorials Point


  Java Basics
  Java Object Oriented
  Java Advanced
  Java Useful References
  Java Useful Resources
  Selected Reading

© 2011 TutorialsPoint.COM


  Home     References     Discussion Forums     About TP  

Java - toRadians() Method


previous next AddThis Social Bookmark Button


Description:

The method converts the argument value to radians.

Syntax:

double toRadians(double d)

Parameters:

Here is the detail of parameters:

  • A double data type.

Return Value :

  • Return value is a double

Example:

public class Test{ 
   public static void main(String args[]){
     double x = 45.0;
     double y = 30.0;

     System.out.println( Math.toRadians(x) );
     System.out.println( Math.toRadians(y) );
   }
}

This produces following result:

0.7853981633974483
0.5235987755982988


previous next Printer Friendly



  

Advertisement

Online Image Processing

Indian Baby Names