public static double PointDistance(PointStructDouble pointOne, PointStructDouble pointTwo) { double x = pointOne.X - pointTwo.X; double y = pointOne.Y - pointTwo.Y; return(Math.Sqrt((x * x) + (y * y))); }
public void test3() { PointStructDouble point1 = new PointStructDouble { X = 10, Y = 5 }; PointStructDouble point2 = new PointStructDouble { X = 15, Y = 10 }; PointStructDouble.PointDistance(point1, point2); }