Registry / utility / umahmood-haversine

umahmood-haversine

JSON →
library0.0.0-20151105152445-808ab04add26gogounverified

Calculates the great-circle distance between two points on the Earth using the haversine formula.

go get github.com/umahmood/haversine
INSTALL
IMPORT
SIG · UMAHMOOD-HAVERSINE
U
umahmood-haversine
utilitygov0.0.0-20151105152445-808ab04add26
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

haversine
github.com/umahmood/haversine

Calculates distance between London and Paris in kilometers.

package main import ( "fmt" "github.com/umahmood/haversine" ) func main() { lat1, lon1 := 51.509865, -0.118092 lat2, lon2 := 48.8566, 2.3522 km, _ := haversine.Distance(haversine.Coord{Lat: lat1, Lon: lon1}, haversine.Coord{Lat: lat2, Lon: lon2}) fmt.Printf("Distance: %.2f km\n", km) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20151105152445-808ab04add26latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
umahmood-haversine — go get umahmood-haversine · libregistry