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

Defined in:

haversine.cr
haversine/distance.cr
haversine/version.cr

Constant Summary

RAD_PER_DEG = Math::PI / 180
VERSION = "0.1.0"

Class Method Summary

Class Method Detail

def self.distance(lat1 : Float64, lon1 : Float64, lat2 : Float64, lon2 : Float64) #

Calculates the haversine distance between two locations using latitude and longitude.


[View source]
def self.distance(cord1 : Array(Float64), cord2 : Array(Float64)) #

ditto


[View source]