contains method

bool contains(
  1. double x,
  2. double y
)

Determines whether the specified x and y coordinates are contained within the rectangular region defined by this GRect object.

Implementation

bool contains(double x, double y) {
  return x >= this.x && y >= this.y && x < right && y < bottom;
}