Esempio n. 1
0
        public static double CalculateDistance3D(I3Dimentional firstPoint3D, I3Dimentional secondPoint3D)
        {
            double distance =
                Math.Sqrt(
                    Math.Pow(secondPoint3D.X - firstPoint3D.X, 2) +
                    Math.Pow(secondPoint3D.Y - firstPoint3D.Y, 2) +
                    Math.Pow(secondPoint3D.Z - firstPoint3D.Z, 2));

            return(distance);
        }
Esempio n. 2
0
        public static double CalculateDistance3D(I3Dimentional firstPoint3D, I3Dimentional secondPoint3D)
        {
            double distance =
                Math.Sqrt(
                    Math.Pow(secondPoint3D.X - firstPoint3D.X, 2) +
                    Math.Pow(secondPoint3D.Y - firstPoint3D.Y, 2)+
                    Math.Pow(secondPoint3D.Z - firstPoint3D.Z, 2));

            return distance;
        }