Convert degrees to radian in Java
Description
The following code shows how to convert degrees to radian.
Example
/*from w ww . j a v a 2 s .c om*/
public class Main {
public static void main(String[] args) {
// Obtain angle in degrees from user
double degs = 20d;
// Convert degrees to radian
double rads = Math.toRadians(degs);
}
}