Here you can find the source of toDegrees(float radians)
public static float toDegrees(float radians)
//package com.java2s; //License from project: Open Source License public class Main { public static final double TAU = 2 * Math.PI; public static float toDegrees(float radians) { return (float) (radians * 360 / TAU); }// w w w. j a v a2s . c o m public static double toDegrees(double radians) { return (radians * 360 / TAU); } }