Пример #1
0
        private static void Main()
        {
            Console.WriteLine(DistanceBetwenTwoPoints.CalculateDistanceBetwenTwoPoints(new Point3D(1, 2, 3), new Point3D(17, 6, 2.5m))); // 16.5

            Point3D first = new Point3D(3m, 4m, 5m);
            Point3D second = new Point3D(1, 2, 3);
            Point3D third = new Point3D(1.2m, 2.2m, 3.3m);

            Path firstPath = new Path(first, second, third);

            PathStorage.SavePaths(firstPath);

            List<Path> sample = PathStorage.LoadPaths();
        }
Пример #2
0
 public void AddPointToThePath(Point3D inputPoint)
 {
     this.pathByPoints.Add(inputPoint);
 }
 public static double CalculateDistanceBetwenTwoPoints(Point3D first, Point3D second)
 {
     return Math.Sqrt((double)(((second.CoordX - first.CoordX) * (second.CoordX - first.CoordX)) + ((second.CoordY - first.CoordY) * (second.CoordY - first.CoordY)) + ((second.CoordZ - first.CoordZ) * (second.CoordZ - first.CoordZ))));
 }