Java Integer to intToDouble(int coordinate)

Here you can find the source of intToDouble(int coordinate)

Description

Converts a coordinate from microdegrees to degrees.

License

Open Source License

Parameter

Parameter Description
coordinate the coordinate in microdegrees.

Return

the coordinate in degrees.

Declaration

public static double intToDouble(int coordinate) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2011 MadRobot.//from w  w  w  .ja  v  a2 s .  c o  m
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Lesser Public License v2.1
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * 
 * Contributors:
 *  Elton Kent - initial API and implementation
 ******************************************************************************/

public class Main {
    /**
     * The multiplication factor to convert from double to int.
     */
    private static final double FACTOR_DOUBLE_TO_INT = 1000000;

    /**
     * Converts a coordinate from microdegrees to degrees.
     * 
     * @param coordinate
     *            the coordinate in microdegrees.
     * @return the coordinate in degrees.
     */
    public static double intToDouble(int coordinate) {
        return coordinate / FACTOR_DOUBLE_TO_INT;
    }
}

Related

  1. intToColumnName(int column)
  2. intToDateString(int i)
  3. intToDay(int d)
  4. intToDegree(int storedInt)
  5. intToDigits(int n)
  6. intToDouble(int[] input)
  7. intToDouble100000(int i)
  8. intToDoubleArray(int[] labels)
  9. intToEightByte(long value, byte[] dest, int off)