NatanMalta / haversine

Small Java class for calculating the distance between two points.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

haversine

Small Java class for calculating the distance between two points using the Haversine formula.

public static double distance(double startLat, double startLong,
                              double endLat, double endLong)

How to use

Call in a static context:

Haversine.distance(47.6788206, -122.3271205,
                   47.6788206, -122.5271205)

// -> 14.973190481586224 [km]

About

Small Java class for calculating the distance between two points.


Languages

Language:Java 100.0%