Skip to content

Small Java class for calculating the distance between two points.

Notifications You must be signed in to change notification settings

jasonwinn/haversine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages