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

            Parallelepiped.Width  = 3;
            Parallelepiped.Height = 4;
            Parallelepiped.Depth  = 5;
            Console.WriteLine("Volume = {0:f2}", Parallelepiped.CalcVolume());
            Console.WriteLine("Diagonal XYZ = {0:f2}", Parallelepiped.CalcDiagonalXYZ());
            Console.WriteLine("Diagonal XY = {0:f2}", Parallelepiped.CalcDiagonalXY());
            Console.WriteLine("Diagonal XZ = {0:f2}", Parallelepiped.CalcDiagonalXZ());
            Console.WriteLine("Diagonal YZ = {0:f2}", Parallelepiped.CalcDiagonalYZ());
        }
Ejemplo n.º 2
0
        public static double CalcDiagonalXZ()
        {
            double distance = SpaceUtils.CalcDistance2D(0, 0, Width, Depth);

            return(distance);
        }
Ejemplo n.º 3
0
        public static double CalcDiagonalYZ()
        {
            double distance = SpaceUtils.CalcDistance2D(0, 0, Height, Depth);

            return(distance);
        }
Ejemplo n.º 4
0
        public static double CalcDiagonalXY()
        {
            double distance = SpaceUtils.CalcDistance2D(0, 0, Width, Height);

            return(distance);
        }