Java examples for java.lang:Math Radian
Calculate radian from degree
//package com.java2s; public class Main { public static void main(String[] argv) throws Exception { double degrees = 2.45678; System.out.println(radFromDeg(degrees)); }/*from w w w . j ava 2 s .c o m*/ /** * Calculate radian from degree * @param degrees * @return radian */ public static double radFromDeg(double degrees) { return degrees * Math.PI / 180; } }