atan2() Method in java

Java Programming Language / Number Class in java

814

Program:

 public class Wrapperatan2Method {

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

	      System.out.println( Math.atan2(x, y) );
	   }
}

/*

Converts rectangular coordinates (x, y) to 
polar coordinate (r, theta) and returns theta.

*/

Output:

0.9272952180016122
Press any key to continue . . .

This Particular section is dedicated to Programs only. If you want learn more about Java Programming Language. Then you can visit below links to get more depth on this subject.