Mercurial > touhou
diff pytouhou/utils/matrix.py @ 44:c435e83a8e70
Fix Matrix.rotate_y
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Mon, 22 Aug 2011 09:10:36 +0200 |
parents | 55973a3f1222 |
children | ab826bc29aa2 |
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):