Android Distance Readable Format distanceToMiles(double distance)

Here you can find the source of distanceToMiles(double distance)

Description

distance To Miles

Declaration

public static String distanceToMiles(double distance) 

Method Source Code

//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);
    }
}

Related

  1. distance(float distanceInKm, boolean imperial)
  2. distanceToKM(double distance)
  3. durationToHourMinOrMinSec(long duration)