intersectsWithAabb2 method

bool intersectsWithAabb2 (Aabb2 other)

Return if this intersects with other.

Implementation

bool intersectsWithAabb2(Aabb2 other) {
  final Vector2 otherMax = other._max;
  final Vector2 otherMin = other._min;

  return (_min.x <= otherMax.x) &&
      (_min.y <= otherMax.y) &&
      (_max.x >= otherMin.x) &&
      (_max.y >= otherMin.y);
}