예제 #1
0
        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)));
        }
예제 #2
0
        public void test1()
        {
            PointClassFloat point1 = new PointClassFloat {
                X = 10, Y = 5
            };
            PointClassFloat point2 = new PointClassFloat {
                X = 15, Y = 10
            };

            PointClassFloat.PointDistance(point1, point2);
        }