Here you can find the source of intToDouble(int coordinate)
Parameter | Description |
---|---|
coordinate | the coordinate in microdegrees. |
public static double intToDouble(int coordinate)
//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; } }