intersects method

bool intersects(
  1. Bounds other
)

Computes if this bounding box and another one intersect.

Implementation

bool intersects(Bounds other) {
  for (var i = 0; i < length; i++) {
    final lower = math.max(min[i], other.min[i]);
    final upper = math.min(max[i], other.max[i]);
    if (lower > upper) return false;
  }
  return true;
}