Java examples for java.lang:Math Geometry
Converts degrees to radians.
//package com.java2s; public class Main { /**/*from ww w . jav a2 s .c o m*/ * Converts degrees to radians. * * <p> * This method uses double precision internally, though it returns single float. Factor = pi / * 180. * * @param degrees * The angle in degrees. * @return The angle in radians. */ public static float toRadians(float degrees) { return (float) (degrees * 0.017453292519943295769236907684886); } }