coordinatesInRect function

bool coordinatesInRect(
  1. double x,
  2. double y,
  3. Rect rect
)

Implementation

bool coordinatesInRect(double x, double y, Rect rect) {
  return x >= rect.left && x <= rect.right && y >= rect.top && y <= rect.bottom;
}