| 514 | } |
| 515 | |
| 516 | ShapeRange ShapeRange::unify(const ShapeRange& other) const { |
| 517 | ShapeRange out; |
| 518 | |
| 519 | if (_minimum <= other.minimum()) |
| 520 | out.setLower(_minimum); |
| 521 | else |
| 522 | out.setLower(other.minimum()); |
| 523 | |
| 524 | if (_maximum >= other.maximum()) |
| 525 | out.setUpper(_maximum); |
| 526 | else |
| 527 | out.setUpper(other.maximum()); |
| 528 | |
| 529 | return out; |
| 530 | } |
| 531 | |
| 532 | bool ShapeRange::isUnbound() const { |
| 533 | return _maximum.isUnbound(); |