geometry.py

changeset 92
b8d72909d593
parent 90
6ae063fd27dc
child 103
662de6b8cfc2
equal deleted inserted replaced
91:c71a7d863c2e 92:b8d72909d593
323 def __mul__(self, scalar): 323 def __mul__(self, scalar):
324 return Matrix3x3([ 324 return Matrix3x3([
325 x * scalar 325 x * scalar
326 for x in self.values 326 for x in self.values
327 ]) 327 ])
328 def is_mirrored(self):
329 return self.determinant() < 0
328 330
329 def complete_matrix(matrix, anchor): 331 def complete_matrix(matrix, anchor):
330 ''' 332 '''
331 Combines a 3×3 matrix and an anchor vertex into a full 4×4 333 Combines a 3×3 matrix and an anchor vertex into a full 4×4
332 transformation matrix. 334 transformation matrix.

mercurial