public static LatLong interpolateLatLong(LatLong p1, LatLong p2, double fraction) {

        double maxLat = max(p1.latitude(), p2.latitude());
        double minLat = min(p1.latitude(), p2.latitude());
        checkArgument(maxLat - minLat <= 90.0, "Interpolation is unsafe at this distance (latitude)");

        double maxLong = max(p1.longitude(), p2.longitude());
        double minLong = min(p1.longitude(), p2.longitude());
        checkArgument(maxLong - minLong <= 180.0, "Interpolation is unsafe at this distance (longitude)");

        return new LatLong(
            interpolate(p1.latitude(), p2.latitude(), fraction),
            interpolate(p1.longitude(), p2.longitude(), fraction)
        );
    }
@Test
    public void testInterpolateLatLong() {

        LatLong p1 = new LatLong(0.0, 5.0);
        LatLong p2 = new LatLong(5.0, 0.0);

        double TOLERANCE = 0.0001;

        assertEquals(
            0.0,
            interpolateLatLong(p1, p2, 0.0).latitude(),
            TOLERANCE
        );
        assertEquals(
            5.0,
            interpolateLatLong(p1, p2, 1.0).latitude(),
            TOLERANCE
        );

        assertEquals(
            5.0,
            interpolateLatLong(p1, p2, 0.0).longitude(),
            TOLERANCE
        );
        assertEquals(
            0.0,
            interpolateLatLong(p1, p2, 1.0).longitude(),
            TOLERANCE
        );
    }