Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Contains() [3/7]

ContainmentType Microsoft.Xna.Framework.BoundingSphere.Contains ( BoundingSphere sphere)
inline

Definition at line 480 of file BoundingSphere.cs.

481 {
482 Vector3.Distance(ref Center, ref sphere.Center, out var result);
483 float radius = Radius;
484 float radius2 = sphere.Radius;
485 if (!(radius + radius2 >= result))
486 {
487 return ContainmentType.Disjoint;
488 }
489 if (!(radius - radius2 >= result))
490 {
491 return ContainmentType.Intersects;
492 }
494 }
bool ICollection< KeyValuePair< TKey, TValue > >. Contains(KeyValuePair< TKey, TValue > keyValuePair)

References Microsoft.Xna.Framework.BoundingSphere.Center, System.Collections.Generic.Dictionary< TKey, TValue >.Contains(), Microsoft.Xna.Framework.Vector3.Distance(), and Microsoft.Xna.Framework.BoundingSphere.Radius.