covers method
Tests if the given point lies in or on the envelope.
@param x the x-coordinate of the point which this Envelope
is
being checked for containing
@param y the y-coordinate of the point which this Envelope
is
being checked for containing
@return true
if (x, y)
lies in the interior or
on the boundary of this Envelope
.
Implementation
bool covers(double x, double y) {
if (isNull()) return false;
return x >= _minx && x <= _maxx && y >= _miny && y <= _maxy;
}