module Haversine
Overview
The haversine formula determines the great-circle distance between two points on a sphere given their latitudes and longitudes.
https://en.wikipedia.org/wiki/Haversine_formula
Extended Modules
Defined in:
haversine.crhaversine/distance.cr
haversine/version.cr
Constant Summary
-
RAD_PER_DEG =
Math::PI / 180
-
VERSION =
{{ (`shards version /srv/crystaldoc.info/github-mamantoha-haversine-v0.3.1/src/haversine`).chomp.stringify }}
Instance Method Summary
-
#distance(lat1 : Number, lon1 : Number, lat2 : Number, lon2 : Number) : Haversine::Distance
Calculates the haversine distance between two locations using latitude and longitude.
-
#distance(coord1 : Array(Number), coord2 : Array(Number)) : Haversine::Distance
Calculates the haversine distance between two locations using latitude and longitude.
-
#distance(coord1 : Tuple(Number, Number), coord2 : Tuple(Number, Number)) : Haversine::Distance
Calculates the haversine distance between two locations using latitude and longitude.
Instance Method Detail
Calculates the haversine distance between two locations using latitude and longitude.
Calculates the haversine distance between two locations using latitude and longitude.