Skip to main content

haversineDistanceKm

Stentor API Reference


Stentor API Reference / stentor-address/src / haversineDistanceKm

Function: haversineDistanceKm()

haversineDistanceKm(one, two): number

Defined in: packages/stentor-address/src/haversine.ts:9

Calculate the Haversine distance between two points on the Earth.

Parameters​

one​

The first point with latitude and longitude.

lat​

number

lon​

number

two​

The second point with latitude and longitude.

lat​

number

lon​

number

Returns​

number

The distance between the two points in kilometers.