# HG changeset patch # User Emmanuel Gil Peyrot # Date 1428516673 -7200 # Node ID dd393fa6e98869e4a6c41c9342c9e45eb42f0d6b # Parent df6ae915ebaa65364e0a453b12a86856b0031b07 Simplify the invert code in Animation. diff --git a/pytouhou/formats/animation.pyx b/pytouhou/formats/animation.pyx --- 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. / width, 1. / height] + self.size_inv[:] = [1 / width, 1 / height]