Skip to main content

haversineDistanceMiles

Stentor API Reference


Stentor API Reference / stentor-address/src / haversineDistanceMiles

Function: haversineDistanceMiles()

haversineDistanceMiles(one, two): number

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

Calculate the Haversine distance between two points on the Earth in miles.

Calls first haversineDistanceKm and uses a conversion rate of 1 km = 0.621371 miles.

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 miles.