pub fn intersects(&self, other: &Interval<T>) -> bool {
    if self.equal_both_limitless(self.as_upper_limit(), other.as_upper_limit()) {
      true
    } else if self.equal_both_limitless(self.as_lower_limit(), self.as_lower_limit()) {
      true
    } else {
      let g = self.greater_of_lower_limits(other);
      let l = self.lesser_of_upper_limits(other);
      if g < l {
        true
      } else if g > l {
        false
      } else {
        self.greater_of_lower_included_in_intersection(other)
          && self.lesser_of_upper_included_in_intersection(other)
      }
    }
  }
/// Verify if there is a common part between this interval and the given interval `other`.
///
/// - params
///     - other: a target interval
/// - return: `true` if the common part exists, `false` otherwise
Verify if there is a common part between this interval and the given interval `other`.
params
other: a target interval
return: `true` if the common part exists, `false` otherwise
Verify if there is a common part between this interval and the given interval ` other ` . params other : a target interval return : ` true ` if the common part exists ` false ` otherwise
pub fn intersects(&self, other: &Interval<T>) -> bool {
    if self.equal_both_limitless(self.as_upper_limit(), other.as_upper_limit()) {
      true
    } else if self.equal_both_limitless(self.as_lower_limit(), self.as_lower_limit()) {
      true
    } else {
      let g = self.greater_of_lower_limits(other);
      let l = self.lesser_of_upper_limits(other);
      if g < l {
        true
      } else if g > l {
        false
      } else {
        self.greater_of_lower_included_in_intersection(other)
          && self.lesser_of_upper_included_in_intersection(other)
      }
    }
  }
pub fn intersects ( & self , other : & Interval < T > ) -> bool { if self . equal_both_limitless ( self . as_upper_limit ( ) , other . as_upper_limit ( ) ) { true } else if self . equal_both_limitless ( self . as_lower_limit ( ) , self . as_lower_limit ( ) ) { true } else { let g = self . greater_of_lower_limits ( other ) ; let l = self . lesser_of_upper_limits ( other ) ; if g < l { true } else if g > l { false } else { self . greater_of_lower_included_in_intersection ( other ) && self . lesser_of_upper_included_in_intersection ( other ) } } }
Verify if there is a common part between this interval and the given interval `other`.
Verify if there is a common part between this interval and the given interval ` other ` .
&self
other
&Interval<T>