예제 #1
0
        public void InverseIdentityTest()
        {
            double4x4 M  = double4x4.Identity;
            double4x4 MI = M.Inverse();

            Assert.AreEqual(double4x4.Identity, MI);
        }
예제 #2
0
        public void InverseBiggerTest()
        {
            double4x4 M = new double4x4(
                2, 3, 4, 5,
                2, 5, 9, 15,
                3, 5, 7, 10,
                4, 8, 13, 21
                );
            double4x4 MI = M.Inverse();

            Assert.AreEqual(double4x4.Identity, M * MI);
            Assert.AreEqual(double4x4.Identity, MI * M);
        }
예제 #3
0
        public void InverseSimpleTest()
        {
            double4x4 M = new double4x4(
                0, 0, 1, 0,
                0, 1, 0, 0,
                0, 0, 0, 1,
                1, 0, 0, 0
                );
            double4x4 MI = M.Inverse();

            Assert.AreEqual(double4x4.Identity, M * MI);
            Assert.AreEqual(double4x4.Identity, MI * M);
        }