Skip to content

Commit fc27e31

Browse files
committed
Implement IntervalSet::orSet
1 parent 9e1b759 commit fc27e31

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/IntervalSet.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,16 @@ public function subtract(IntervalSet $set) : self
6969
return self::subtractSets($this, $set);
7070
}
7171

72+
public function orSet(IntervalSet $other) : self
73+
{
74+
$result = new self();
75+
76+
$result->addSet($this);
77+
$result->addSet($other);
78+
79+
return $result;
80+
}
81+
7282
/**
7383
* Compute the set difference between two interval sets. The specific
7484
* operation is `left - right`. If either of the input sets is `null`,

0 commit comments

Comments
 (0)