distanceRadians static method

num distanceRadians(
  1. num lat1,
  2. num lng1,
  3. num lat2,
  4. num lng2,
)

Returns distance on the unit sphere; the arguments are in radians.

Implementation

static num distanceRadians(num lat1, num lng1, num lat2, num lng2) =>
    MathUtil.arcHav(MathUtil.havDistance(lat1, lat2, lng1 - lng2));