isGeoPointInBoudingBox method

bool isGeoPointInBoudingBox(
  1. Coordinate l,
  2. Coordinate topLeft,
  3. Coordinate bottomRight
)

check if a given geo point is in the bouding box

Implementation

bool isGeoPointInBoudingBox(
    Coordinate l, Coordinate topLeft, Coordinate bottomRight) {
  return topLeft.y <= l.y &&
          l.y <= bottomRight.y &&
          topLeft.x <= l.x &&
          l.x <= bottomRight.x
      ? true
      : false;
}