コード例 #1
0
 /// <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));
 }
コード例 #2
0
 /// <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));
 }