Here you can find the source of degToRad(final double deg)
Parameter | Description |
---|---|
deg | The degree to convert |
public static double degToRad(final double deg)
//package com.java2s; //License from project: Open Source License public class Main { /**/*from w ww. j av a 2s .com*/ * The degrees which represents a half circle. */ private static final int HALF_CIRCLE_DEG = 180; /** * Converts a value in degree to radians. * * @param deg * The degree to convert * @return The given value in radians */ public static double degToRad(final double deg) { return deg * Math.PI / HALF_CIRCLE_DEG; } }