Пример #1
0
        public void Add()
        {
            Mat2d m1 = new Mat2d();

            m1.SetIdentity();
            Mat2d m2  = new Mat2d(new XY(0, 2), new XY(3, 0));
            Mat2d res = new Mat2d(new XY(1, 2), new XY(3, 1));

            Assert.AreEqual(res, m1.Added(m2));
        }
        public void ValueType_Mat()
        {
            Mat2d m1 = new Mat2d();

            m1.SetIdentity();
            Mat2d m2  = new Mat2d(new XY(0, 2), new XY(3, 0));
            Mat2d res = new Mat2d(new XY(1, 2), new XY(3, 1));

            Assert.AreEqual(res, m1.Added(m2));
            Assert.AreEqual(-6, m2.Determinant());
        }