Mercurial > touhou
changeset 624:dd393fa6e988
Simplify the invert code in Animation.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Wed, 08 Apr 2015 20:11:13 +0200 |
parents | df6ae915ebaa |
children | 3168e5ff22dc |
files | pytouhou/formats/animation.pyx |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/pytouhou/formats/animation.pyx +++ b/pytouhou/formats/animation.pyx @@ -23,5 +23,6 @@ cdef class Animation: property size: def __set__(self, tuple value): + cdef double width, height width, height = value - self.size_inv[:] = [1. / <double>width, 1. / <double>height] + self.size_inv[:] = [1 / width, 1 / height]