convert Radians To Degrees - Java java.lang

Java examples for java.lang:Math Radian

Description

convert Radians To Degrees

Demo Code


//package com.java2s;

public class Main {
    public static void main(String[] argv) throws Exception {
        float radians = 2.45678f;
        System.out.println(convertRadiansToDegrees(radians));
    }/*  w  w w. j  av  a 2s  . c  o  m*/

    public static final float RAD_TO_DEG_FACTOR = (float) (180.0 / Math.PI);

    public static float convertRadiansToDegrees(float radians) {
        return radians * RAD_TO_DEG_FACTOR;
    }
}

Related Tutorials