contains method

bool contains(
  1. Mappoint point
)

Returns true if this rectangle contains the given point.

Implementation

bool contains(Mappoint point) {
  return left <= point.x && right >= point.x && top <= point.y && bottom >= point.y;
}