isEqual method

bool isEqual(
  1. GeoPoint location, {
  2. double precision = 1e6,
})

Implementation

bool isEqual(GeoPoint location, {double precision = 1e6}) {
  assert(isEqual1eX(precision), "precision should be between 1e-2,1e-8");
  final exponent = log(precision) ~/ log10e;
  final nPrecision = exponent.isNegative ? precision : 1 / precision;
  return (latitude - location.latitude).abs() <= nPrecision &&
      (longitude - location.longitude).abs() <= nPrecision;
}