contains method

bool contains(
  1. double latitude,
  2. double longitude
)

Tests if the given coordinates are within this bounding box.

latitude The latitude coordinate to test longitude The longitude coordinate to test Returns true if the coordinates are within the boundary (inclusive)

Implementation

bool contains(double latitude, double longitude) {
  return minLatitude <= latitude && maxLatitude >= latitude && minLongitude <= longitude && maxLongitude >= longitude;
}