Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 486 Bytes

README.md

File metadata and controls

16 lines (11 loc) · 486 Bytes

Haversine Distance

The Haversine distance formula determines the great-circle distance between two points on a sphere given their longitudes and latitudes.

Usage

Add a package to your Xcode project by select File > Swift Packages > Add Package Dependency and enter https://github.com/tmn/HaversineDistance.

import haversineFormula

let haversine = Haversine.distance(
    firstLocation: (63.421798, 10.394786),
    secondLocation: (63.416191, 10.431693)
)