summaryrefslogtreecommitdiffstats
path: root/libdimension-python
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-08-12 10:19:27 -0600
committerTavian Barnes <tavianator@gmail.com>2011-08-12 10:19:27 -0600
commit7742c81f3cbfa01f5e81ae6f5fe2c8edf754edb4 (patch)
treef850a91140c654ae99c4706ae5141f20d26b6015 /libdimension-python
parentd8a599acb5150d28473c443baca293a87a9fdad0 (diff)
downloaddimension-7742c81f3cbfa01f5e81ae6f5fe2c8edf754edb4.tar.xz
Use regular def for Matrix.inverse().
cpdef seems to generate non-ISO-C code.
Diffstat (limited to 'libdimension-python')
-rw-r--r--libdimension-python/dimension.pyx5
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."""