public boolean approxEquals(R1Interval y,double maxError){
  if (isEmpty()) {
    return y.getLength() <= maxError;
  }
  if (y.isEmpty()) {
    return getLength() <= maxError;
  }
  return Math.abs(y.lo() - lo()) + Math.abs(y.hi() - hi()) <= maxError;
}

public boolean approxEquals ( R1Interval y , double maxError ) { if ( isEmpty ( ) ) { return y . getLength ( ) <= maxError ; } if ( y . isEmpty ( ) ) { return getLength ( ) <= maxError ; } return Math . abs ( y . lo ( ) - lo ( ) ) + Math . abs ( y . hi ( ) - hi ( ) ) <= maxError ; }
return true if length of the symmetric difference between the two intervals is at most the given tolerance .
