Skip to main content

get_intersect

Function get_intersect 

Source
pub fn get_intersect<T: Ord + Copy>(
    r1: &Range<T>,
    r2: &Range<T>,
) -> Option<Range<T>>
Expand description

Computes the intersection of two half-open ranges, returning Some(intersection) if they overlap, or None if they do not.