Here you can find the source of distanceToMiles(double distance)
public static String distanceToMiles(double distance)
//package com.java2s; public class Main { public static String distanceToMiles(double distance) { return round(distance * 0.000621371) + " mi"; }/*from ww w .j a v a 2 s .co m*/ public static double round(double value) { return ((int) (value * 10) / 10.0); } }