Mercurial > touhou
diff pytouhou/utils/interpolator.pyx @ 131:fab7ad2f0d8b
Use Cython, improve performances!
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Sun, 11 Sep 2011 02:02:59 +0200 |
parents | pytouhou/utils/interpolator.py@174324a4da51 |
children | d778db08190f |
line wrap: on
line diff
copy from pytouhou/utils/interpolator.py copy to pytouhou/utils/interpolator.pyx --- a/pytouhou/utils/interpolator.py +++ b/pytouhou/utils/interpolator.pyx @@ -56,6 +56,6 @@ class Interpolator(object): self.start_frame = frame else: coeff = self._formula(float(frame - self.start_frame) / float(self.end_frame - self.start_frame)) - self.values = tuple(start_value + coeff * (end_value - start_value) - for (start_value, end_value) in zip(self.start_values, self.end_values)) + self.values = [start_value + coeff * (end_value - start_value) + for (start_value, end_value) in zip(self.start_values, self.end_values)]