Converts the position value from semi circles to degrees. - Java java.lang

Java examples for java.lang:Math Convert

Description

Converts the position value from semi circles to degrees.

Demo Code


//package com.java2s;

public class Main {
    private static final double SEMICIRCLE_2_DEGREES = 180 / Math
            .pow(2, 31);/*from ww  w . j  a va  2 s.c  o  m*/

    /**
     * Converts the position value from semicircles to degrees.
     *
     * @param semicircles value in semicircles
     * @return value in degrees
     */
    public static double convertSemicircle2Degree(int semicircles) {
        return semicircles * SEMICIRCLE_2_DEGREES;
    }
}

Related Tutorials