def testTranspose(self): t = LinearTransform2D() t.pos = (5, 3) self.assert_( numpy.allclose( t.transpose.matrix, [ [1,0,0], [0,1,0], [5,3,1] ]), t.transpose.matrix )
def testInverse(self): t = LinearTransform2D() t.pos = (5, 3) t.scale = (2,2) self.assert_( numpy.allclose( t.inverse.matrix, [ [0.5,0,-2.5], [0,0.5,-1.5], [0,0,1] ]), t.inverse.matrix )