Exemple #1
0
 //-------------------------------------------------------------------------------------------
 //Расстояния между точками массива и заданной точкой
 public static double[] GetDistances(Point3D[] points, Point3D targetPoint)
 {
     double[] distances = new double[points.Length];
     for (int index = 0; index < points.Length; index++)
     {
         Point3D point    = points[index];
         double  distance = SpaceManager.DistanceBetweenTwoPoints(point, targetPoint);
         distances[index] = distance;
     }
     return(distances);
 }
        //-------------------------------------------------------------------------------------------
        //Расстояние до заданной точки
        public double GetDistanceToPoint(Point3D point)
        {
            double distance = SpaceManager.DistanceBetweenTwoPoints(this, point);

            return(distance);
        }