public boolean approxEquals(final S1Interval y,double maxError){
  if (isEmpty()) {
    return y.getLength() <= maxError;
  }
  if (y.isEmpty()) {
    return getLength() <= maxError;
  }
  return (Math.abs(Math.IEEEremainder(y.lo() - lo(),2 * S2.M_PI)) + Math.abs(Math.IEEEremainder(y.hi() - hi(),2 * S2.M_PI))) <= maxError;
}

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