Union `self` with `other` in-place. Empty boxes (arity 0) are ignored — callers seed leaves with concrete MBRs.
(&mut self, other: &BBox)
| 32 | /// Union `self` with `other` in-place. Empty boxes (arity 0) are |
| 33 | /// ignored — callers seed leaves with concrete MBRs. |
| 34 | pub fn extend(&mut self, other: &BBox) { |
| 35 | if self.arity() == 0 { |
| 36 | *self = other.clone(); |
| 37 | return; |
| 38 | } |
| 39 | for i in 0..self.arity().min(other.arity()) { |
| 40 | if super::predicate::lt_bound(&other.min[i], &self.min[i]) { |
| 41 | self.min[i] = other.min[i].clone(); |
| 42 | } |
| 43 | if super::predicate::lt_bound(&self.max[i], &other.max[i]) { |
| 44 | self.max[i] = other.max[i].clone(); |
| 45 | } |
| 46 | } |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | /// One node in the Hilbert-packed R-tree. |