public S1Interval expanded(double radius){
  if (isEmpty()) {
    return this;
  }
  if (getLength() + 2 * radius >= 2 * S2.M_PI - 1e-15) {
    return full();
  }
  double lo=Math.IEEEremainder(lo() - radius,2 * S2.M_PI);
  double hi=Math.IEEEremainder(hi() + radius,2 * S2.M_PI);
  if (lo == -S2.M_PI) {
    lo=S2.M_PI;
  }
  return new S1Interval(lo,hi);
}

public S1Interval expanded ( double radius ) { if ( isEmpty ( ) ) { return this ; } if ( getLength ( ) + 2 * radius >= 2 * S2 . M_PI - 1e-15 ) { return full ( ) ; } double lo = Math . IEEEremainder ( lo ( ) - radius , 2 * S2 . M_PI ) ; double hi = Math . IEEEremainder ( hi ( ) + radius , 2 * S2 . M_PI ) ; if ( lo == - S2 . M_PI ) { lo = S2 . M_PI ; } return new S1Interval ( lo , hi ) ; }
return an interval that contains all points within a distance " radius " of a point in this interval . note that the expansion of an empty interval is always empty . the radius must be non - negative .
