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

◆ Normalize() [3/3]

static void Microsoft.Xna.Framework.Plane.Normalize ( ref Plane value,
out Plane result )
inlinestatic

Definition at line 125 of file Plane.cs.

126 {
127 float num = value.Normal.X * value.Normal.X + value.Normal.Y * value.Normal.Y + value.Normal.Z * value.Normal.Z;
128 if (Math.Abs(num - 1f) < 1.1920929E-07f)
129 {
130 result.Normal = value.Normal;
131 result.D = value.D;
132 return;
133 }
134 float num2 = 1f / (float)Math.Sqrt(num);
135 result.Normal.X = value.Normal.X * num2;
136 result.Normal.Y = value.Normal.Y * num2;
137 result.Normal.Z = value.Normal.Z * num2;
138 result.D = value.D * num2;
139 }
static double Sqrt(double d)
static double Abs(double value)

References System.Math.Abs(), System.Math.Sqrt(), and System.value.