shigeki7299 / geopaparazzi

Automatically exported from code.google.com/p/geopaparazzi
0 stars 0 forks source link

Mesurement Tool modification #195

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
         /**Add ability of the measurement tool to utilize inches rather than meters. **/

public final class ConvertMetric {

      /** Multiplier for meters to feet. **/

private static final double FEET_CONVERT = 3.2808399;

private ConvertMetric() {}

           /** Convert a number of meters to feet. **/
 * @param meters Value to convert in meters.
 * @return meters converted to feet.
 */

public static double asFeet(final double meters) {
    DecimalFormat twoDForm = new DecimalFormat("#.##");
    return Double.valueOf(twoDForm.format(meters * FEET_CONVERT));
}

Original issue reported on code.google.com by promptne...@gmail.com on 6 Sep 2013 at 3:25

GoogleCodeExporter commented 8 years ago

Original comment by andrea.a...@gmail.com on 8 Sep 2013 at 8:40