示例#1
0
        public void Absolute()
        {
            Matrix44F absoluteM = new Matrix44F(-1, -2, -3, -4,
                                          -5, -6, -7, -8,
                                          -9, -10, -11, -12,
                                          -13, -14, -15, -16);
              absoluteM.Absolute();

              Assert.AreEqual(1, absoluteM.M00);
              Assert.AreEqual(2, absoluteM.M01);
              Assert.AreEqual(3, absoluteM.M02);
              Assert.AreEqual(4, absoluteM.M03);
              Assert.AreEqual(5, absoluteM.M10);
              Assert.AreEqual(6, absoluteM.M11);
              Assert.AreEqual(7, absoluteM.M12);
              Assert.AreEqual(8, absoluteM.M13);
              Assert.AreEqual(9, absoluteM.M20);
              Assert.AreEqual(10, absoluteM.M21);
              Assert.AreEqual(11, absoluteM.M22);
              Assert.AreEqual(12, absoluteM.M23);
              Assert.AreEqual(13, absoluteM.M30);
              Assert.AreEqual(14, absoluteM.M31);
              Assert.AreEqual(15, absoluteM.M32);
              Assert.AreEqual(16, absoluteM.M33);

              absoluteM = new Matrix44F(1, 2, 3, 4,
                                5, 6, 7, 8,
                                9, 10, 11, 12,
                                13, 14, 15, 16);
              absoluteM.Absolute();
              Assert.AreEqual(1, absoluteM.M00);
              Assert.AreEqual(2, absoluteM.M01);
              Assert.AreEqual(3, absoluteM.M02);
              Assert.AreEqual(4, absoluteM.M03);
              Assert.AreEqual(5, absoluteM.M10);
              Assert.AreEqual(6, absoluteM.M11);
              Assert.AreEqual(7, absoluteM.M12);
              Assert.AreEqual(8, absoluteM.M13);
              Assert.AreEqual(9, absoluteM.M20);
              Assert.AreEqual(10, absoluteM.M21);
              Assert.AreEqual(11, absoluteM.M22);
              Assert.AreEqual(12, absoluteM.M23);
              Assert.AreEqual(13, absoluteM.M30);
              Assert.AreEqual(14, absoluteM.M31);
              Assert.AreEqual(15, absoluteM.M32);
              Assert.AreEqual(16, absoluteM.M33);
        }