MCPcopy Create free account
hub / github.com/PageBot/PageBot / _dotProduct

Function _dotProduct

Lib/pagebot/mathematics/transform3d.py:20–32  ·  view source on GitHub ↗
(array, matrix)

Source from the content-addressed store, hash-verified

18import math
19
20def _dotProduct(array, matrix):
21 output = []
22 for pt in array:
23 if not output:
24 assert len(pt) == len(matrix) == len(matrix[0])
25 outPt = []
26 for i in range(len(pt)):
27 t = 0
28 for j, c in enumerate(pt):
29 t += c * matrix[j][i]
30 outPt.append(t)
31 output.append(tuple(outPt))
32 return tuple(output)
33
34def _offsetArray3D(array, offset):
35 dx, dy, dz = offset

Callers 2

transformMethod · 0.85
transformPointsMethod · 0.85

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected