Mercurial > touhou
diff pytouhou/formats/animation.pyx @ 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 | 725bd24235a2 |
children |
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]