Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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; 
        }
Exemplo n.º 4
0
        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;
        }