init method
Initialize an Envelope
for a region defined by maximum and minimum values.
@param x1 the first x-value @param x2 the second x-value @param y1 the first y-value @param y2 the second y-value
Implementation
void init(double x1, double x2, double y1, double y2) {
if (x1 < x2) {
_minx = x1;
_maxx = x2;
} else {
_minx = x2;
_maxx = x1;
}
if (y1 < y2) {
_miny = y1;
_maxy = y2;
} else {
_miny = y2;
_maxy = y1;
}
}