Example #1
0
        public void AbsoluteStatic()
        {
            Matrix22D m         = new Matrix22D(-1, -2, -3, -4);
            Matrix22D absoluteM = Matrix22D.Absolute(m);

            Assert.AreEqual(1, absoluteM.M00);
            Assert.AreEqual(2, absoluteM.M01);
            Assert.AreEqual(3, absoluteM.M10);
            Assert.AreEqual(4, absoluteM.M11);

            m         = new Matrix22D(1, 2, 3, 4);
            absoluteM = Matrix22D.Absolute(m);
            Assert.AreEqual(1, absoluteM.M00);
            Assert.AreEqual(2, absoluteM.M01);
            Assert.AreEqual(3, absoluteM.M10);
            Assert.AreEqual(4, absoluteM.M11);
        }
Example #2
0
        public void Absolute()
        {
            Matrix22D absoluteM = new Matrix22D(-1, -2, -3, -4);
              absoluteM.Absolute();

              Assert.AreEqual(1, absoluteM.M00);
              Assert.AreEqual(2, absoluteM.M01);
              Assert.AreEqual(3, absoluteM.M10);
              Assert.AreEqual(4, absoluteM.M11);

              absoluteM = new Matrix22D(1, 2, 3, 4);
              absoluteM.Absolute();
              Assert.AreEqual(1, absoluteM.M00);
              Assert.AreEqual(2, absoluteM.M01);
              Assert.AreEqual(3, absoluteM.M10);
              Assert.AreEqual(4, absoluteM.M11);
        }