public static float PointDistance(PointClassFloat pointOne, PointClassFloat pointTwo) { float x = pointOne.X - pointTwo.X; float y = pointOne.Y - pointTwo.Y; return(MathF.Sqrt((x * x) + (y * y))); }
public void test1() { PointClassFloat point1 = new PointClassFloat { X = 10, Y = 5 }; PointClassFloat point2 = new PointClassFloat { X = 15, Y = 10 }; PointClassFloat.PointDistance(point1, point2); }