intersects method
Checks if this rectangle intersects with another rectangle.
Parameters
- IN area The RectangleGeographicArea to check intersection with.
Returns
- True if the rectangles intersect, false otherwise.
Implementation
bool intersects(final RectangleGeographicArea area) {
return bottomRight.longitude >= area.topLeft.longitude &&
area.bottomRight.longitude >= topLeft.longitude &&
topLeft.latitude >= area.bottomRight.latitude &&
area.topLeft.latitude >= bottomRight.latitude;
}