Example #1
0
        public static float PointDistanceFloatStruct(PointStruct pointOne, PointStruct pointTwo)
        {
            float x = pointOne.X - pointTwo.X;
            float y = pointOne.Y - pointTwo.Y;

            return((x * x) + (y * y));
        }
Example #2
0
        public static double PointDistanceDoubleStructSqrt(PointStruct pointOne, PointStruct pointTwo)
        {
            double x = pointOne.X - pointTwo.X;
            double y = pointOne.Y - pointTwo.Y;

            return(Math.Sqrt((x * x) + (y * y)));
        }