Exemplo n.º 1
0
        public static float Distance(Point3D a, Point3D b)
        {
            var deltaX = a.X - b.X;
            var deltaY = a.Y - b.Y;
            var deltaZ = a.Z - b.Z;

            return (float) Math.Sqrt(deltaX*deltaX + deltaY*deltaY + deltaZ*deltaZ);
        }
Exemplo n.º 2
0
        private static void Main()
        {
            //Printing point.
            Console.WriteLine(new Point3D(5, 6, 5));

            //Distance calc.
            var pointA = new Point3D(1, 2, 3);
            var pointB = new Point3D(3, 4, 5);

            Console.WriteLine(DistanceCalculator.Distance(pointA, pointB));

            //Path
            var path = new Path3D(new[] {pointA, pointB});

            Storage.SavePath(path);

            Storage.LoadPaths();
        }