intersection

infix fun intersection(other: Interval): Interval

Calculates the intersection between this interval and another.

If either interval is empty, or there is no overlap, the result will be an empty interval. The exact endpoints of the empty interval are not meaningful, only the fact that it is empty.