public static double distance(final int ilon1, final int ilat1, final int ilon2, final int ilat2) {
        final double[] kxky = getLonLatToMeterScales((ilat1 + ilat2) >> 1);
        final double dlon = (ilon1 - ilon2) * kxky[0];
        final double dlat = (ilat1 - ilat2) * kxky[1];
        return Math.sqrt(dlat * dlat + dlon * dlon); // in m
    }
Compute the distance (in meters) between two points represented by their
(integer) latitude and longitude.

@param ilon1 Integer longitude for the start point. this is (longitude in degrees + 180) * 1e6.
@param ilat1 Integer latitude for the start point, this is (latitude + 90) * 1e6.
@param ilon2 Integer longitude for the end point, this is (longitude + 180) * 1e6.
@param ilat2 Integer latitude for the end point, this is (latitude + 90) * 1e6.
@return The distance between the two points, in meters.
<p>
Note:
Integer longitude is ((longitude in degrees) + 180) * 1e6.
Integer latitude is ((latitude in degrees) + 90) * 1e6.
main/src/main/java/cgeo/geocaching/brouter/util/CheapRulerHelper.java