isValid method

bool isValid()

Verify that the bounds are sorted

Implementation

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