contains method
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;
}