diff options
author | Tavian Barnes <tavianator@gmail.com> | 2011-08-12 10:19:27 -0600 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2011-08-12 10:19:27 -0600 |
commit | 7742c81f3cbfa01f5e81ae6f5fe2c8edf754edb4 (patch) | |
tree | f850a91140c654ae99c4706ae5141f20d26b6015 | |
parent | d8a599acb5150d28473c443baca293a87a9fdad0 (diff) | |
download | dimension-7742c81f3cbfa01f5e81ae6f5fe2c8edf754edb4.tar.xz |
Use regular def for Matrix.inverse().
cpdef seems to generate non-ISO-C code.
-rw-r--r-- | libdimension-python/dimension.pyx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libdimension-python/dimension.pyx b/libdimension-python/dimension.pyx index 996e288..4485bfe 100644 --- a/libdimension-python/dimension.pyx +++ b/libdimension-python/dimension.pyx @@ -270,7 +270,7 @@ cdef class Matrix: else: return NotImplemented - cpdef Matrix inverse(self): + def inverse(self): """Return the inverse of a matrix.""" return _Matrix(dmnsn_matrix_inverse(self._m)) @@ -940,9 +940,10 @@ cdef class Object: # Transform an object without affecting the texture cdef _intrinsic_transform(self, Matrix trans): self._object.trans = dmnsn_matrix_mul(self._object.trans, trans._m) + cdef Matrix inv = trans.inverse() if self._object.texture != NULL: self._object.texture.trans = dmnsn_matrix_mul(self._object.texture.trans, - trans.inverse()._m) + inv._m) cdef class Triangle(Object): """A triangle.""" |