Skip to main content

intersection

Function intersection 

Source
pub fn intersection(a: &Btic, b: &Btic) -> Option<Btic>
Expand description

Compute the intersection of two intervals.

Returns [max(a.lo, b.lo), min(a.hi, b.hi)), or None if the intervals are disjoint (the result would be empty).

Granularity and certainty are inherited per spec ยง14.3:

  • Each result bound inherits metadata from whichever input provided that bound.
  • When both inputs have equal bound values, the finer granularity and least certain certainty are used.