private GetDistanceSquared ( Vector2 x ) : float | ||
x | Vector2 | |
Résultat | 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;
}
QEF::GetDistanceSquared ( Vector2 x, Vector2 p, Vector2 n ) : float |