Пример #1
0
        public void T11_Det()
        {
            Mat3 a = new Mat3(1, 2, 6, -5, 8, -4, 2, 6, 4);

            Assert.AreEqual(56, a.Cofactor(0, 0));
            Assert.AreEqual(12, a.Cofactor(0, 1));
            Assert.AreEqual(-46, a.Cofactor(0, 2));
            Assert.AreEqual(-196, a.Det());

            Mat4 b = new Mat4(-2, -8, 3, 5, -3, 1, 7, 3, 1, 2, -9, 6, -6, 7, 7, -9);

            Assert.AreEqual(-4071, b.Det());
        }