Beispiel #1
0
        public static double CalcStructDistanceDouble(StructDouble point1, StructDouble point2)
        {
            double x = point1.X - point2.X;
            double y = point1.Y - point2.Y;

            return(Math.Sqrt((x * x) + (y * y)));
        }
Beispiel #2
0
        public void GetDistanceFromStructDouble()
        {
            var pointEnd = new StructDouble()
            {
                X = setX_double, Y = setY_double
            };
            var pointStart = new StructDouble()
            {
                X = 42.6498, Y = 42.12385612
            };

            CalcStructDistanceDouble(pointStart, pointEnd);
        }