Exemplo n.º 1
0
        public static double CalcDiagonalXY(Paralelepiled paralelepiled)
        {
            double distance = DistanceUtils.CalcDistance2D(zeroPosition, zeroPosition,
                paralelepiled.Width, paralelepiled.Height);

            return distance;
        }
Exemplo n.º 2
0
        public static double CalcDiagonalYZ(Paralelepiled paralelepiled)
        {
            double distance = DistanceUtils.CalcDistance2D(zeroPosition, zeroPosition,
                paralelepiled.Height, paralelepiled.Depth);

            return distance;
        }
        public static void Main()
        {
            Console.WriteLine(FileExtensionUtils.GetFileExtension("example"));
            Console.WriteLine(FileExtensionUtils.GetFileExtension("example.pdf"));
            Console.WriteLine(FileExtensionUtils.GetFileExtension("example.new.pdf"));

            Console.WriteLine(FileExtensionUtils.GetFileNameWithoutExtension("example"));
            Console.WriteLine(FileExtensionUtils.GetFileNameWithoutExtension("example.pdf"));
            Console.WriteLine(FileExtensionUtils.GetFileNameWithoutExtension("example.new.pdf"));

            MakeBounderies();

            Console.WriteLine("Distance in the 2D space = {0:f2}",
                DistanceUtils.CalcDistance2D(1, -2, 3, 4));
            Console.WriteLine("Distance in the 3D space = {0:f2}",
                DistanceUtils.CalcDistance3D(5, 2, -1, 3, -6, 4));

            MakeBounderies();

            Paralelepiled paralelepiped = new Paralelepiled(3, 4, 5);

            Console.WriteLine("Volume = {0:f2}", MathUtils.CalcVolume(paralelepiped));
            Console.WriteLine("Diagonal XYZ = {0:f2}", MathUtils.CalcDiagonalXYZ(paralelepiped));
            Console.WriteLine("Diagonal XY = {0:f2}", MathUtils.CalcDiagonalXY(paralelepiped));
            Console.WriteLine("Diagonal XZ = {0:f2}", MathUtils.CalcDiagonalXZ(paralelepiped));
            Console.WriteLine("Diagonal YZ = {0:f2}", MathUtils.CalcDiagonalYZ(paralelepiped));
        }
Exemplo n.º 4
0
        public static double CalcVolume(Paralelepiled paralelepiled)
        {
            double volume = paralelepiled.Width * paralelepiled.Height * paralelepiled.Depth;

            return volume;
        }