Exemplo n.º 1
0
        public void InverseTest()
        {
            var matrix = new TransformMatrix(
                -1, 3, 3.5, 9,
                1, 2, 1.5, 1,
                -3, 7.6, 9, 7.45,
                5, 2, 4, 9);

            var inversedMatrix = matrix.Inverse();

            var expMatrix = new double[] { -0.0941737649063033, 0.212470187393527, -0.0477001703577513, 0.110051107325383, 0.246882453151618, 0.924906303236797, -0.149914821124361, -0.225553662691652, -0.376149914821124, -0.699829642248722, 0.272572402044293, 0.228279386712095, 0.164633730834753, -0.0125383304940375, -0.0613287904599659, -0.00136286201022147 };

            CollectionAssert.AreEqual(expMatrix, inversedMatrix.ToArray(), new DoubleComparer());
        }