Mercurial > touhou
comparison pytouhou/utils/matrix.pyx @ 620:e5361b74b9ad
Remove 3d scaling code for matrix, as it isn’t used anywhere in the codebase.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Wed, 01 Apr 2015 02:28:54 +0200 |
parents | 560b45a7d014 |
children |
comparison
equal
deleted
inserted
replaced
619:39874a722b76 | 620:e5361b74b9ad |
---|---|
51 | 51 |
52 cdef void flip(Matrix *mat) nogil: | 52 cdef void flip(Matrix *mat) nogil: |
53 data = <float*>mat | 53 data = <float*>mat |
54 for i in range(4): | 54 for i in range(4): |
55 data[i] = -data[i] | 55 data[i] = -data[i] |
56 | |
57 | |
58 cdef void scale(Matrix *mat, float x, float y, float z) nogil: | |
59 cdef float coordinate[3] | |
60 | |
61 data = <float*>mat | |
62 coordinate[0] = x | |
63 coordinate[1] = y | |
64 coordinate[2] = z | |
65 | |
66 for i in range(3): | |
67 for j in range(4): | |
68 data[4*i+j] *= coordinate[i] | |
69 | 56 |
70 | 57 |
71 cdef void scale2d(Matrix *mat, float x, float y) nogil: | 58 cdef void scale2d(Matrix *mat, float x, float y) nogil: |
72 data = <float*>mat | 59 data = <float*>mat |
73 for i in range(4): | 60 for i in range(4): |