Returns whether p lies within this rectangle.
p
bool contains(Position p) => p.x >= minX && p.x < maxX && p.y >= minY && p.y < maxY;