public static double CalculateDistance(IntPoint a, IntPoint b) { double x = (a._x - b._x); double y = (a._y - b._y); return Math.Sqrt(x*x + y*y); }