Converts an angle measured in radians to the equivalent angle measured in degrees - Android java.lang

Android examples for java.lang:Math Trigonometric Function

Description

Converts an angle measured in radians to the equivalent angle measured in degrees

Demo Code


//package com.java2s;

public class Main {
    public static final double PI = Math.PI;

    /**/*w w w  .jav a  2  s  . c  om*/
     * Converts an angle measured in radians to the equivalent angle measured in degrees
     * @param angleRadians The angle measured in radians
     * @return The equivalent angle measured in degrees
     */
    public static double radiansToDegrees(double angleRadians) {
        return ((angleRadians * 180.0) / Math.PI);
    }
}

Related Tutorials