Exemple #1
0
 def test_asTransposed(self):
     mt = Matrix2D.asTransposed(self.m)
     self.assertAlmostEqual(mt.m11, self.m.m11)
     self.assertAlmostEqual(mt.m12, self.m.m21)
     self.assertAlmostEqual(mt.m21, self.m.m12)
     self.assertAlmostEqual(mt.m22, self.m.m22)
Exemple #2
0
    def test_determinant(self):
        dm = Matrix2D.det(self.m)
        di = Matrix2D.det(self.i)

        self.assertAlmostEqual(dm, 1)
        self.assertAlmostEqual(di, 1)