Пример #1
0
        public double DistanceTo(Point3D point3D)
        {
            double a = point3D.X - X;
            double b = point3D.Y - Y;
            double c = point3D.Z - Z;

            return Math.Sqrt(a * a + b * b + c * c);
        }
Пример #2
0
        public Point3D Add(Point3D point3D)
        {
            X += point3D.X;
            Y += point3D.Y;
            Z += point3D.Z;

            return this;
        }
Пример #3
0
        public bool Equals(Point3D p)
        {
            if (ReferenceEquals(null, p))
                return false;

            if (ReferenceEquals(this, p))
                return true;

            return p.X.Equals(X) && p.Y.Equals(Y) && p.Z.Equals(Z);
        }