pub fn intersect(&self, other: &Interval<T>) -> Interval<T> {
    let intersect_lower_bound = self.greater_of_lower_limits(other);
    let intersect_upper_bound = self.lesser_of_upper_limits(other);
    if *intersect_lower_bound > *intersect_upper_bound {
      self.empty_of_same_type()
    } else {
      self.new_of_same_type(
        intersect_lower_bound.clone(),
        self.greater_of_lower_included_in_intersection(other),
        intersect_upper_bound.clone(),
        self.lesser_of_upper_included_in_intersection(other),
      )
    }
  }
/// Return the product set (common part) of this interval and the given interval `other`.
///
/// If the common part does not exist, it returns an empty interval.
///
/// - params
///     - other: an interval to be compared
Return the product set (common part) of this interval and the given interval `other`.
If the common part does not exist, it returns an empty interval.

params
other: an interval to be compared
Return the product set ( common part ) of this interval and the given interval ` other ` . If the common part does not exist it returns an empty interval . params other : an interval to be compared
pub fn intersect(&self, other: &Interval<T>) -> Interval<T> {
    let intersect_lower_bound = self.greater_of_lower_limits(other);
    let intersect_upper_bound = self.lesser_of_upper_limits(other);
    if *intersect_lower_bound > *intersect_upper_bound {
      self.empty_of_same_type()
    } else {
      self.new_of_same_type(
        intersect_lower_bound.clone(),
        self.greater_of_lower_included_in_intersection(other),
        intersect_upper_bound.clone(),
        self.lesser_of_upper_included_in_intersection(other),
      )
    }
  }
pub fn intersect ( & self , other : & Interval < T > ) -> Interval < T > { let intersect_lower_bound = self . greater_of_lower_limits ( other ) ; let intersect_upper_bound = self . lesser_of_upper_limits ( other ) ; if * intersect_lower_bound > * intersect_upper_bound { self . empty_of_same_type ( ) } else { self . new_of_same_type ( intersect_lower_bound . clone ( ) , self . greater_of_lower_included_in_intersection ( other ) , intersect_upper_bound . clone ( ) , self . lesser_of_upper_included_in_intersection ( other ) , ) } }
Return the product set (common part) of this interval and the given interval `other`.
Return the product set ( common part ) of this interval and the given interval ` other ` .
&self
other
&Interval<T>