public static double Calculate(Point3D firstPoint, Point3D secondPoint)
        {
            double distance = Math.Sqrt
                ((secondPoint.X - firstPoint.X) * (secondPoint.X - firstPoint.X) +
                (secondPoint.Y - firstPoint.Y) * (secondPoint.Y - firstPoint.Y) +
                (secondPoint.Z - firstPoint.Z) * (secondPoint.Z - firstPoint.Z));

            return distance;
        }
Exemple #2
0
 public void RemovePoint(Point3D point)
 {
     this.PointList.Remove(point);
 }
Exemple #3
0
 public void AddPoint(Point3D point)
 {
     this.PointList.Add(point);
 }
Exemple #4
0
        private double z; // Task 1

        #endregion Fields

        #region Constructors

        //Task 2
        static Point3D()
        {
            pointO = new Point3D(0,0,0);
        }