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; }