Pure geographic math functions — no I/O, no side effects.
Pure geographic math functions — no I/O, no side effects.
(bearing {lat-from :lat lng-from :lng} {lat-to :lat lng-to :lng})Calculate the initial bearing (forward azimuth) from point from to point to.
Args: from - map with :lat and :lng (decimal degrees) to - map with :lat and :lng (decimal degrees)
Returns: Bearing in degrees clockwise from north (0–360).
Calculate the initial bearing (forward azimuth) from point `from` to point `to`. Args: from - map with :lat and :lng (decimal degrees) to - map with :lat and :lng (decimal degrees) Returns: Bearing in degrees clockwise from north (0–360).
(haversine-distance {lat-a :lat lng-a :lng} {lat-b :lat lng-b :lng})Calculate the great-circle distance between two points using the Haversine formula.
Args: point-a - map with :lat and :lng (decimal degrees) point-b - map with :lat and :lng (decimal degrees)
Returns: Distance in kilometres as a double.
Calculate the great-circle distance between two points using the Haversine formula. Args: point-a - map with :lat and :lng (decimal degrees) point-b - map with :lat and :lng (decimal degrees) Returns: Distance in kilometres as a double.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |