havDistance static method

num havDistance(
  1. num lat1,
  2. num lat2,
  3. num dLng
)

Returns hav() of distance from (lat1, lng1) to (lat2, lng2) on the unit sphere.

Implementation

static num havDistance(num lat1, num lat2, num dLng) =>
    hav(lat1 - lat2) + hav(dLng) * cos(lat1) * cos(lat2);