コード例 #1
0
        public void AbsoluteStatic()
        {
            Matrix22F m         = new Matrix22F(-1, -2, -3, -4);
            Matrix22F absoluteM = Matrix22F.Absolute(m);

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

            m         = new Matrix22F(1, 2, 3, 4);
            absoluteM = Matrix22F.Absolute(m);
            Assert.AreEqual(1, absoluteM.M00);
            Assert.AreEqual(2, absoluteM.M01);
            Assert.AreEqual(3, absoluteM.M10);
            Assert.AreEqual(4, absoluteM.M11);
        }
コード例 #2
0
ファイル: Matrix22FTest.cs プロジェクト: Zolniu/DigitalRune
        public void Absolute()
        {
            Matrix22F absoluteM = new Matrix22F(-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 Matrix22F(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);
        }