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

◆ CreateFromBoundingBox() [2/2]

static void Microsoft.Xna.Framework.BoundingSphere.CreateFromBoundingBox ( ref BoundingBox box,
out BoundingSphere result )
inlinestatic

Definition at line 127 of file BoundingSphere.cs.

128 {
129 Vector3.Lerp(ref box.Min, ref box.Max, 0.5f, out result.Center);
130 Vector3.Distance(ref box.Min, ref box.Max, out var result2);
131 result.Radius = result2 * 0.5f;
132 }

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