fastDistanceBetween static method

double fastDistanceBetween(
  1. double lat1,
  2. double lng1,
  3. double lat2,
  4. double lng2,
)

Calculate the Euclidean distance from this point to another using the Pythagorean theorem.

@param other The point to calculate the distance to @return the distance in degrees as a double

Implementation

static double fastDistanceBetween(
    double lat1, double lng1, double lat2, double lng2) {
  return _hypot(lng1 - lng2, lat1 - lat2);
}