示例#1
0
 static void Main(string[] args)
 {
     TestMatrix.RunAdd();
     TestMatrix.RunMul();
     TestMatrix.RunScalarMul();
     TestMatrix.RunInverse();
     TestMatrix.RunTranspose();
     TestMatrix.RunIsOrthogonal();
     TestMatrix.RunTranslation();
     TestMatrix.RunScalingMatrix();
     TestMatrix.RunRotation3D();
     TestMatrix.RunMinEl();
     TestMatrix.RunMaxEl();
     Console.ReadLine();
 }
示例#2
0
        /// <summary>
        /// Tests Matrix.Inverse()
        /// </summary>
        public static void RunInverse()
        {
            Console.WriteLine("Running inverse matrix.");
            Matrix matrix = new Matrix(TestMatrix.Input());

            Console.WriteLine("Matrix is\n" + matrix);
            Console.WriteLine("Matrix inverse is\n" + matrix.Inverse());
            try
            {
                matrix = Input();
                //entering
                //1 1
                //1 1
                Console.WriteLine(matrix.Inverse());
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }