/// <summary> /// Determines whether or not a given JelloAABB overlaps this one. /// </summary> /// <param name="aabb">The JelloAABB to test against.</param> /// <returns>Whether the JelloAABBs overlap.</returns> public bool intersects(JelloAABB aabb) { return((Min.y <= aabb.Max.y) && (Max.y >= aabb.Min.y) && (Min.x <= aabb.Max.x) && (Max.x >= aabb.Min.x)); }
/// <summary> /// Determines whether or not a given JelloAABB overlaps this one. /// </summary> /// <param name="aabb">The JelloAABB to test against.</param> /// <returns>Whether the JelloAABBs overlap.</returns> public bool intersects(JelloAABB aabb) { return ((Min.y <= aabb.Max.y) && (Max.y >= aabb.Min.y) && (Min.x <= aabb.Max.x) && (Max.x >= aabb.Min.x)); }