Example #1
0
        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;
        }
Example #2
0
 public void RemovePoint(Point3D point)
 {
     this.PointList.Remove(point);
 }
Example #3
0
 public void AddPoint(Point3D point)
 {
     this.PointList.Add(point);
 }
Example #4
0
        private double z; // Task 1

        #endregion Fields

        #region Constructors

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