Isosurface.QEF.GetDistanceSquared C# (CSharp) Method

GetDistanceSquared() private method

private GetDistanceSquared ( Vector2 x ) : float
x Vector2
return float
        private float GetDistanceSquared(Vector2 x)
        {
            float total = 0;
            for (int i = 0; i < Intersections.Count; i++)
            {
                Vector2 d = x - Intersections[i];
                float dot = Normals[i].X * d.X + Normals[i].Y * d.Y;
                total += dot * dot;
            }
            return total;
        }

Same methods

QEF::GetDistanceSquared ( Vector2 x, Vector2 p, Vector2 n ) : float