public static double DistanceBetween(RectangularCoordinate r1, RectangularCoordinate r2) { double r = Math.Pow(r1.X - r2.X, 2) + Math.Pow(r1.Y - r2.Y, 2) + Math.Pow(r1.Z - r2.Z, 2); return(Math.Sqrt(r)); }
public double DistanceTo(RectangularCoordinate r) => DistanceBetween(this, r);
public RectangularCoordinate(RectangularCoordinate r) : this(r.X, r.Y, r.Z) { }