pub fn gap(&self, other: &Interval<T>) -> Interval<T> {
    if self.intersects(other) {
      self.empty_of_same_type()
    } else {
      self.new_of_same_type(
        self.lesser_of_upper_limits(other).clone(),
        !self.lesser_of_upper_included_in_union(other),
        self.greater_of_lower_limits(other).clone(),
        !self.greater_of_lower_included_in_union(other),
      )
    }
  }
/// Get the interval that lies between this interval and the given interval `other`.
///
/// For example, the gap between [3, 5) and [10, 20) is [5, 19).
/// If the two intervals have a common part, return an empty interval.
///
/// - params
///     - other: an interval to be compared
/// - return: gap interval
Get the interval that lies between this interval and the given interval `other`.

params
other: an interval to be compared
return: gap interval
Get the interval that lies between this interval and the given interval ` other ` . params other : an interval to be compared return : gap interval
pub fn gap(&self, other: &Interval<T>) -> Interval<T> {
    if self.intersects(other) {
      self.empty_of_same_type()
    } else {
      self.new_of_same_type(
        self.lesser_of_upper_limits(other).clone(),
        !self.lesser_of_upper_included_in_union(other),
        self.greater_of_lower_limits(other).clone(),
        !self.greater_of_lower_included_in_union(other),
      )
    }
  }
pub fn gap ( & self , other : & Interval < T > ) -> Interval < T > { if self . intersects ( other ) { self . empty_of_same_type ( ) } else { self . new_of_same_type ( self . lesser_of_upper_limits ( other ) . clone ( ) , ! self . lesser_of_upper_included_in_union ( other ) , self . greater_of_lower_limits ( other ) . clone ( ) , ! self . greater_of_lower_included_in_union ( other ) , ) } }
Get the interval that lies between this interval and the given interval `other`.
Get the interval that lies between this interval and the given interval ` other ` .
&self
other
&Interval<T>