comparison 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
comparison
equal deleted inserted replaced
623:df6ae915ebaa 624:dd393fa6e988
21 self.sprites = {} 21 self.sprites = {}
22 self.scripts = {} 22 self.scripts = {}
23 23
24 property size: 24 property size:
25 def __set__(self, tuple value): 25 def __set__(self, tuple value):
26 cdef double width, height
26 width, height = value 27 width, height = value
27 self.size_inv[:] = [1. / <double>width, 1. / <double>height] 28 self.size_inv[:] = [1 / width, 1 / height]