pub fn new(lower: IntervalLimit<T>, upper: IntervalLimit<T>) -> Interval<T> {
    Self::check_lower_is_less_than_or_equal_upper(&lower, &upper);
    let mut l = lower.clone();
    let mut u = upper.clone();
    if !upper.is_infinity()
      && !lower.is_infinity()
      && upper.as_value() == lower.as_value()
      && (lower.is_open() ^ upper.is_open())
    {
      if lower.is_open() {
        l = IntervalLimit::lower(true, lower.as_value().clone());
      }
      if upper.is_open() {
        u = IntervalLimit::upper(true, upper.as_value().clone());
      }
    }
    Self { lower: l, upper: u }
  }
/// Generate an interval.
///
/// - params
///     - lower: lower interval limit
///     - upper: upper interval limit
/// - return: an interval
Generate an interval.
params
lower: lower interval limit
upper: upper interval limit
return: an interval
Generate an interval . params lower : lower interval limit upper : upper interval limit return : an interval
pub fn new(lower: IntervalLimit<T>, upper: IntervalLimit<T>) -> Interval<T> {
    Self::check_lower_is_less_than_or_equal_upper(&lower, &upper);
    let mut l = lower.clone();
    let mut u = upper.clone();
    if !upper.is_infinity()
      && !lower.is_infinity()
      && upper.as_value() == lower.as_value()
      && (lower.is_open() ^ upper.is_open())
    {
      if lower.is_open() {
        l = IntervalLimit::lower(true, lower.as_value().clone());
      }
      if upper.is_open() {
        u = IntervalLimit::upper(true, upper.as_value().clone());
      }
    }
    Self { lower: l, upper: u }
  }
pub fn new ( lower : IntervalLimit < T > , upper : IntervalLimit < T > ) -> Interval < T > { Self :: check_lower_is_less_than_or_equal_upper ( & lower , & upper ) ; let mut l = lower . clone ( ) ; let mut u = upper . clone ( ) ; if ! upper . is_infinity ( ) && ! lower . is_infinity ( ) && upper . as_value ( ) == lower . as_value ( ) && ( lower . is_open ( ) ^ upper . is_open ( ) ) { if lower . is_open ( ) { l = IntervalLimit :: lower ( true , lower . as_value ( ) . clone ( ) ) ; } if upper . is_open ( ) { u = IntervalLimit :: upper ( true , upper . as_value ( ) . clone ( ) ) ; } } Self { lower : l , upper : u } }
Generate an interval.
Generate an interval .
lower
IntervalLimit<T>
upper
IntervalLimit<T>