internal 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}",
                DistanceUtils.CalcDistance2D(1, -2, 3, 4));
            Console.WriteLine(
                "Distance in the 3D space = {0:f2}",
                DistanceUtils.CalcDistance3D(5, 2, -1, 3, -6, 4));

            ParallelipipedUtils.Width  = 3;
            ParallelipipedUtils.Height = 4;
            ParallelipipedUtils.Depth  = 5;
            Console.WriteLine("Volume = {0:f2}", ParallelipipedUtils.CalcVolume());
            Console.WriteLine("Diagonal XYZ = {0:f2}", ParallelipipedUtils.CalcDiagonalXYZ());
            Console.WriteLine("Diagonal XY = {0:f2}", ParallelipipedUtils.CalcDiagonalXY());
            Console.WriteLine("Diagonal XZ = {0:f2}", ParallelipipedUtils.CalcDiagonalXZ());
            Console.WriteLine("Diagonal YZ = {0:f2}", ParallelipipedUtils.CalcDiagonalYZ());
        }
Пример #2
0
        public static void Main()
        {
            // Console.WriteLine(FileNameUtils.GetFileExtension("example")); //throws exception
            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}",
                DistanceUtils.CalcDistance2D(1, -2, 3, 4));
            Console.WriteLine(
                "Distance in the 3D space = {0:f2}",
                DistanceUtils.CalcDistance3D(5, 2, -1, 3, -6, 4));

            Parallelepiped parallelepiped = new Parallelepiped(3, 4, 5);

            Console.WriteLine("Volume = {0:f2}", parallelepiped.CalculateVolume());
            Console.WriteLine("Inner diagonal = {0:f2}", parallelepiped.CalculateInnerDiagonal());
            Console.WriteLine("First side diagonal = {0:f2}", parallelepiped.CalculateFirstSideDiagonal());
            Console.WriteLine("Second side diagonal = {0:f2}", parallelepiped.CalculateSecondSideDiagonal());
            Console.WriteLine("Third side diagonal = {0:f2}", parallelepiped.CalculateThirdSideDiagonal());
        }
        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}",
                GeometryUtils.CalcDistance2D(1, -2, 3, 4));
            Console.WriteLine(
                "Distance in the 3D space = {0:f2}",
                GeometryUtils.CalcDistance3D(5, 2, -1, 3, -6, 4));

            double width  = 3;
            double height = 4;
            double depth  = 5;

            Console.WriteLine("Volume = {0:f2}", GeometryUtils.CalcVolume(width, height, depth));
            Console.WriteLine("Diagonal XYZ = {0:f2}", GeometryUtils.CalcDiagonalXYZ(width, height, depth));
            Console.WriteLine("Diagonal XY = {0:f2}", GeometryUtils.CalcDiagonalXY(width, height));
            Console.WriteLine("Diagonal XZ = {0:f2}", GeometryUtils.CalcDiagonalXZ(width, depth));
            Console.WriteLine("Diagonal YZ = {0:f2}", GeometryUtils.CalcDiagonalYZ(height, depth));
        }
Пример #4
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}",
                              EuclideanSpaceUtils.CalcDistanceBetweenPoints(new double[] { 1, -2 }, new double[] { 3, 4 }));
            Console.WriteLine("Distance in the 3D space = {0:f2}",
                              EuclideanSpaceUtils.CalcDistanceBetweenPoints(new double[] { 5, 2, -1 }, new double[] { 3, -6, 4 }));

            var width  = 3;
            var height = 4;
            var depth  = 5;

            Console.WriteLine("Volume = {0:f2}", ParallelepipedUtils.CalcVolume(width, height, depth));
            Console.WriteLine("Diagonal XYZ = {0:f2}", ParallelepipedUtils.CalcDiagonalLengthXYZ(width, height, depth));
            Console.WriteLine("Diagonal XY = {0:f2}", ParallelepipedUtils.CalcDiagonalLengthXY(width, height));
            Console.WriteLine("Diagonal XZ = {0:f2}", ParallelepipedUtils.CalcDiagonalLengthXZ(width, depth));
            Console.WriteLine("Diagonal YZ = {0:f2}", ParallelepipedUtils.CalcDiagonalYZ(height, depth));
        }
Пример #5
0
        public static void TestFilenameUtils()
        {
            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"));
        }
Пример #6
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}", CalculateDistanceUtils.CalcDistance2D(1, -2, 3, 4));
            Console.WriteLine("Distance in the 3D space = {0:f2}", CalculateDistanceUtils.CalcDistance3D(5, 2, -1, 3, -6, 4));

            Console.WriteLine("Volume = {0:f2}", CalculateDistanceUtils.CalcVolume(3, 4, 5));
            Console.WriteLine("Diagonal XYZ = {0:f2}", CalculateDistanceUtils.CalcDiagonalXYZ(3, 4, 5));
            Console.WriteLine("Diagonal XY = {0:f2}", CalculateDistanceUtils.CalcDiagonalXY(3, 4));
            Console.WriteLine("Diagonal XZ = {0:f2}", CalculateDistanceUtils.CalcDiagonalXZ(3, 5));
            Console.WriteLine("Diagonal YZ = {0:f2}", CalculateDistanceUtils.CalcDiagonalYZ(4, 5));
        }
        private 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}", CalcDistanceUtils.CalcDistance2D(1, -2, 3, 4));
            Console.WriteLine("Distance in the 3D space = {0:f2}", CalcDistanceUtils.CalcDistance3D(5, 2, -1, 3, -6, 4));

            Figure3D testFigure3D = new Figure3D(3, 4, 5);

            Console.WriteLine("Volume = {0:f2}", testFigure3D.CalcVolume());
            Console.WriteLine("Diagonal XYZ = {0:f2}", testFigure3D.CalcDiagonalXyz());
            Console.WriteLine("Diagonal XY = {0:f2}", testFigure3D.CalcDiagonalXy());
            Console.WriteLine("Diagonal XZ = {0:f2}", testFigure3D.CalcDiagonalXz());
            Console.WriteLine("Diagonal YZ = {0:f2}", testFigure3D.CalcDiagonalYz());
        }
Пример #8
0
        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"));

            Point point = new Point(3, 4, 5);

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

            Console.WriteLine("Volume = {0:f2}", point.CalcVolume());
            Console.WriteLine("Diagonal XYZ = {0:f2}", point.CalcDiagonalXYZ());
            Console.WriteLine("Diagonal XY = {0:f2}", point.CalcDiagonalXY());
            Console.WriteLine("Diagonal XZ = {0:f2}", point.CalcDiagonalXZ());
            Console.WriteLine("Diagonal YZ = {0:f2}", point.CalcDiagonalYZ());
        }