class HaversineDistance extends FastDistance {

    public double calc(double latitude1, double longitude1, double latitude2, double longitude2) {
        double lat1 = degreeToRadian(latitude1);
        double lon1 = degreeToRadian(longitude1);
        double lat2 = degreeToRadian(latitude2);
        double lon2 = degreeToRadian(longitude2);

        double vLat = lat2 - lat1;
        double vLon = lon2 - lon1;
        double h = haverSine(vLat) + Math.cos(lat1) * Math.cos(lat2) * haverSine(vLon);
        return cal(h);
    }

}