Beispiel #1
0
        public void TestConstructor()
        {
            var testMatrix = new TransformationTester();

            // Make sure we've initialized to the identity matrix
            Assert.That(testMatrix.GetM(),
                        Is.EqualTo(new[, ]
            {
                { 1, 0, 0 },
                { 0, 1, 0 },
                { 0, 0, 1 }
            }));
        }
Beispiel #2
0
        public void TestSetRow()
        {
            var testMatrix = new TransformationTester();

            testMatrix.SetRow(1, new decimal[] { 4, 5, 6 });

            Assert.That(testMatrix.GetM(),
                        Is.EqualTo(new[, ]
            {
                { 1, 0, 0 },
                { 4, 5, 6 },
                { 0, 0, 1 }
            }));
        }
Beispiel #3
0
        public void TestConstructorWithValues()
        {
            var testMatrix = new TransformationTester(new decimal[, ]
            {
                { 11, 12, 13 },
                { 21, 22, 23 },
                { 31, 32, 33 }
            });

            Assert.That(testMatrix.GetM(),
                        Is.EqualTo(new[, ]
            {
                { 11, 12, 13 },
                { 21, 22, 23 },
                { 31, 32, 33 }
            }));
        }