public double Distance(InterestingPoint b) { // квадрат расстояния return(MathHelper.Sqr(x - b.x) + MathHelper.Sqr(y - b.y)); }
public static double Distance(InterestingPoint a, InterestingPoint b) { return(Math.Sqrt(MathHelper.Sqr(a.x - b.y) + MathHelper.Sqr(a.x - b.y))); }