/** * Return the smallest interval that contains this interval and the given * interval "y". */ public function union(R1Interval $y) { if ($this->isEmpty()) { return $y; } if ($y->isEmpty()) { return $this; } return new R1Interval(min($this->lo(), $y->lo()), max($this->hi(), $y->hi())); }
/** * Return true if the rectangle is empty, i.e. it contains no points at all. */ public function isEmpty() { return $this->lat->isEmpty(); }