diff --git a/codegen/templates/transform_2d.pyx b/codegen/templates/transform_2d.pyx index c45485b..bfc1499 100644 --- a/codegen/templates/transform_2d.pyx +++ b/codegen/templates/transform_2d.pyx @@ -245,13 +245,14 @@ cdef class Transform2D: t.oy = self.muly(other.ox, other.oy) return t - def __imatmul__(self, Transform2D other) -> None: + def __imatmul__(self, Transform2D other) -> Transform2D: self.xx = other.tdotx(self.xx, self.xy) self.xy = other.tdoty(self.xx, self.xy) self.yx = other.tdotx(self.yx, self.yy) self.yy = other.tdoty(self.yx, self.yy) self.ox = other.mulx(self.ox, self.oy) self.oy = other.muly(self.ox, self.oy) + return self cdef inline py_float _determinant(self) noexcept: return self.xx * self.yy - self.xy * self.yx diff --git a/codegen/templates/transform_3d.pyx b/codegen/templates/transform_3d.pyx index c12fb1e..f8002a2 100644 --- a/codegen/templates/transform_3d.pyx +++ b/codegen/templates/transform_3d.pyx @@ -366,7 +366,7 @@ cdef class Transform3D: t.oz = self.mulz(other.ox, other.oy, other.oz) return t - def __imatmul__(self, Transform3D other) -> None: + def __imatmul__(self, Transform3D other) -> Transform3D: self.xx = other.tdotx(self.xx, self.xy, self.xz) self.xy = other.tdoty(self.xx, self.xy, self.xz) self.xz = other.tdotz(self.xx, self.xy, self.xz) @@ -379,6 +379,7 @@ cdef class Transform3D: self.ox = other.mulx(self.ox, self.oy, self.oz) self.oy = other.muly(self.ox, self.oy, self.oz) self.oz = other.mulz(self.ox, self.oy, self.oz) + return self cdef inline py_float _determinant(self) noexcept: return (self.xx * (self.yy * self.zz - self.yz * self.zy) - diff --git a/pyproject.toml b/pyproject.toml index ec8a427..7bd712e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ requires = ["setuptools", "cython"] [project] name = "gdmath" -version = "1.4.0" +version = "1.4.1" description = "GdMath: a fast math library for game development" readme = "README.md" requires-python = ">= 3.9"