static void Main() { Space3D point1 = new Space3D( new Point3D() { X = 2, Y = 4, Z = 6 } ); Space3D point2 = new Space3D( new Point3D() { X = 1, Y = 3, Z = 5 } ); Console.WriteLine(point1); }
static int CalculateDistance(Space3D point1, Space3D point2) { int distance = Math.Sqrt(Math.Pow((point1.X - point2.X), 2) + Math.Pow((point1.Y - point2.Y), 2) + Math.Pow((point1.Z - point2.Z), 2); return distance; }