contains method

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

Returns true if the point (x, y) is inside this rectangle.

Implementation

bool contains(double x, double y) =>
    x >= left && x < right && y >= top && y < bottom;