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

◆ CreateFromBoundingBox() [1/2]

static BoundingSphere Microsoft.Xna.Framework.BoundingSphere.CreateFromBoundingBox ( BoundingBox box)
inlinestatic

Definition at line 118 of file BoundingSphere.cs.

119 {
120 BoundingSphere result = default(BoundingSphere);
121 Vector3.Lerp(ref box.Min, ref box.Max, 0.5f, out result.Center);
122 Vector3.Distance(ref box.Min, ref box.Max, out var result2);
123 result.Radius = result2 * 0.5f;
124 return result;
125 }
BoundingSphere(Vector3 center, float radius)

References Microsoft.Xna.Framework.BoundingSphere.Center, Microsoft.Xna.Framework.Vector3.Distance(), and Microsoft.Xna.Framework.Vector3.Lerp().