Mercurial > touhou
changeset 44:c435e83a8e70
Fix Matrix.rotate_y
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Mon, 22 Aug 2011 09:10:36 +0200 |
parents | 7195aaf95f6e |
children | e01e88b06a13 |
files | pytouhou/utils/matrix.py |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/pytouhou/utils/matrix.py +++ b/pytouhou/utils/matrix.py @@ -47,12 +47,11 @@ class Matrix(object): def rotate_y(self, angle): - #TODO: check d1 = self.data cos_a = cos(angle) sin_a = sin(angle) - d1[0][:], d1[2][:] = ([cos_a * d1[0][i] - sin_a * d1[2][i] for i in range(4)], - [sin_a * d1[0][i] + cos_a * d1[2][i] for i in range(4)]) + d1[0][:], d1[2][:] = ([cos_a * d1[0][i] + sin_a * d1[2][i] for i in range(4)], + [- sin_a * d1[0][i] + cos_a * d1[2][i] for i in range(4)]) def rotate_z(self, angle):