public bool Overlaps(AABB aabb) { Vector3 diff = aabb.ClosestPoint(center) - center; return(diff.Dot(diff) <= (radius * radius)); }
public bool Overlaps(AABB other) { // test for not overlapped as it exits faster return(!(max.x < other.min.x || max.y < other.min.y || min.x > other.max.x || min.y > other.max.y)); }