isValid method

bool isValid()

Verify that the bounds are sorted

Implementation

bool isValid() {
  final dx = upperBound.x - lowerBound.x;
  if (dx < 0.0) {
    return false;
  }
  final dy = upperBound.y - lowerBound.y;
  if (dy < 0) {
    return false;
  }
  return !lowerBound.isInfinite &&
      !lowerBound.isNaN &&
      !upperBound.isInfinite &&
      !upperBound.isNaN;
}