3:53 pm - Friday March 25, 3385

Math Example Program for toRadians(double angdeg)

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044
/*Math Example Program for toRadians(double angdeg)*/
/**
 *@Author:candidJava.com
 *@description:calculate radian value using ToRadians class
 */
public class ToRadians {
	public static void main(String args[]) {
		double x = 90, x1 = 0, x2 = 180;// initialize x,x1,x2
		double radval = StrictMath.toRadians(x);// calculate radval using toRadians()
		System.out.println("Radians:" + radval);// print radval
		double radval1 = StrictMath.toRadians(x1);// calculate raval1
		System.out.println("Radians1:" + radval1);// print radval1
		double radval2 = StrictMath.toRadians(x2);// calculate radval2
		System.out.println("Radians2:" + radval2);// print radval2
	}
}

OUTPUT:
Radians:1.570…
Radians1:0.0
Radians2:3.141592

Filed in: Z-A All Java Codes

Comments are closed.