union method

Interval union(
  1. Interval other
)

Return the interval computed from combining this and other */

Implementation

Interval union(Interval other) {
  return Interval.of(min(a, other.a), max(b, other.b));
}