Пример #1
0
        public static void Main()
        {
            Console.WriteLine(FilenameUtils.GetFileExtension("example"));
            Console.WriteLine(FilenameUtils.GetFileExtension("example.pdf"));
            Console.WriteLine(FilenameUtils.GetFileExtension("example.new.pdf"));

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

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

            var paralelepiped = new Paralelepiped(3, 4, 5);

            Console.WriteLine("Volume = {0:f2}", paralelepiped.CalcVolume());
            Console.WriteLine("Diagonal XYZ = {0:f2}", paralelepiped.CalcDiagonalXYZ());
            Console.WriteLine("Diagonal XY = {0:f2}", paralelepiped.CalcDiagonalXY());
            Console.WriteLine("Diagonal XZ = {0:f2}", paralelepiped.CalcDiagonalXZ());
            Console.WriteLine("Diagonal YZ = {0:f2}", paralelepiped.CalcDiagonalYZ());
        }
Пример #2
0
        public static void Main()
        {
            Console.WriteLine(FileUtils.GetFileExtension("example"));
            Console.WriteLine(FileUtils.GetFileExtension("example.pdf"));
            Console.WriteLine(FileUtils.GetFileExtension("example.new.pdf"));

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

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

            GeometricUtils.Width  = 3;
            GeometricUtils.Height = 4;
            GeometricUtils.Depth  = 5;
            Console.WriteLine("Volume = {0:f2}", GeometricUtils.CalcVolume());
            Console.WriteLine("Diagonal XYZ = {0:f2}", GeometricUtils.CalcDiagonalXYZ());
            Console.WriteLine("Diagonal XY = {0:f2}", GeometricUtils.CalcDiagonalXY());
            Console.WriteLine("Diagonal XZ = {0:f2}", GeometricUtils.CalcDiagonalXZ());
            Console.WriteLine("Diagonal YZ = {0:f2}", GeometricUtils.CalcDiagonalYZ());
        }
Пример #3
0
        public double CalcDiagonalXY()
        {
            double distance = GeometricUtils.CalcDistance2D(0, 0, this.Width, this.Height);

            return(distance);
        }
Пример #4
0
        public double CalcDiagonalXZ()
        {
            double distance = GeometricUtils.CalcDistance2D(0, 0, this.Width, this.Depth);

            return(distance);
        }
Пример #5
0
        public double CalcDiagonalYZ()
        {
            double distance = GeometricUtils.CalcDistance2D(0, 0, this.Height, this.Depth);

            return(distance);
        }