Java Angle to Degree toDegrees(int val)

Here you can find the source of toDegrees(int val)

Description

Convert an angle in map units to degrees.

License

Open Source License

Declaration

public static double toDegrees(int val) 

Method Source Code

//package com.java2s;
/*/*from  ww w.j a v  a  2s  . c  om*/
 * Copyright (C) 2006 Steve Ratcliffe
 * 
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License version 2 as
 *  published by the Free Software Foundation.
 * 
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 * 
 * 
 * Author: Steve Ratcliffe
 * Create date: 03-Dec-2006
 */

public class Main {
    /**
     * Convert an angle in map units to degrees.
     */
    public static double toDegrees(int val) {
        return (double) val * (360.0 / (1 << 24));
    }
}

Related

  1. toDegree(double angle)
  2. toDegrees(final double angle)
  3. toDegrees(float angle)
  4. toDegrees(Short angrad)