Function R1Interval.approxEquals

Returns true if this interval can be transformed into the given interval by moving each endpoint by at most "max_error". The empty interval is considered to be positioned arbitrarily on the real line, thus any interval with (length <= 2*max_error) matches the empty interval.

bool approxEquals (
  in const(R1Interval) y,
  double max_error = 1e-15
) const;