public Interval1D(double min,double max){
  if (Double.isInfinite(min) || Double.isInfinite(max))   throw new IllegalArgumentException("Endpoints must be finite");
  if (Double.isNaN(min) || Double.isNaN(max))   throw new IllegalArgumentException("Endpoints cannot be NaN");
  if (min == 0.0)   min=0.0;
  if (max == 0.0)   max=0.0;
  if (min <= max) {
    this.min=min;
    this.max=max;
  }
 else   throw new IllegalArgumentException("Illegal interval");
}

public Interval1D ( double min , double max ) { if ( Double . isInfinite ( min ) || Double . isInfinite ( max ) ) throw new IllegalArgumentException ( "Endpoints must be finite" ) ; if ( Double . isNaN ( min ) || Double . isNaN ( max ) ) throw new IllegalArgumentException ( "Endpoints cannot be NaN" ) ; if ( min == 0.0 ) min = 0.0 ; if ( max == 0.0 ) max = 0.0 ; if ( min <= max ) { this . min = min ; this . max = max ; } else throw new IllegalArgumentException ( "Illegal interval" ) ; }
initializes a closed interval [ min , max ] .
