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

            FigureUtils figure = new FigureUtils(3, 4, 5);

            Console.WriteLine("Volume = {0:f2}", figure.CalcVolume());
            Console.WriteLine("Diagonal XYZ = {0:f2}", figure.CalcDiagonalXYZ());
            Console.WriteLine("Diagonal XY = {0:f2}", figure.CalcDiagonalXY());
            Console.WriteLine("Diagonal XZ = {0:f2}", figure.CalcDiagonalXZ());
            Console.WriteLine("Diagonal YZ = {0:f2}", figure.CalcDiagonalYZ());
        }
示例#2
0
        private double CalculateDiagonal(double firstSide, double secondSide, double thirdSide)
        {
            double distance = DistanceUtils.CalcDistance3D(0, 0, 0, firstSide, secondSide, thirdSide);

            return(distance);
        }
        public double CalcDiagonalYZ()
        {
            double distance = DistanceUtils.CalcDistance2D(0, 0, this.Height, this.Depth);

            return(distance);
        }
        public double CalcDiagonalXZ()
        {
            double distance = DistanceUtils.CalcDistance2D(0, 0, this.Width, this.Depth);

            return(distance);
        }
        public double CalcDiagonalXY()
        {
            double distance = DistanceUtils.CalcDistance2D(0, 0, this.Width, this.Height);

            return(distance);
        }
示例#6
0
        public static double CalcDiagonalXYZ()
        {
            double distance = DistanceUtils.CalcDistance3D(0, 0, 0, Width, Height, Depth);

            return(distance);
        }
示例#7
0
        internal double CalcDiagonalXYZ()
        {
            double distance = DistanceUtils.CalcDistance3D(0, 0, 0, this.Width, this.Height, this.Depth);

            return(distance);
        }