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

◆ Normalize() [2/3]

static Plane Microsoft.Xna.Framework.Plane.Normalize ( Plane value)
inlinestatic

Definition at line 107 of file Plane.cs.

108 {
109 float num = value.Normal.X * value.Normal.X + value.Normal.Y * value.Normal.Y + value.Normal.Z * value.Normal.Z;
110 Plane result = default(Plane);
111 if (Math.Abs(num - 1f) < 1.1920929E-07f)
112 {
113 result.Normal = value.Normal;
114 result.D = value.D;
115 return result;
116 }
117 float num2 = 1f / (float)Math.Sqrt(num);
118 result.Normal.X = value.Normal.X * num2;
119 result.Normal.Y = value.Normal.Y * num2;
120 result.Normal.Z = value.Normal.Z * num2;
121 result.D = value.D * num2;
122 return result;
123 }
static double Sqrt(double d)
static double Abs(double value)
Plane(float a, float b, float c, float d)
Definition Plane.cs:19

References System.Math.Abs(), Microsoft.Xna.Framework.Plane.Normal, System.Math.Sqrt(), and System.value.