MCPcopy Index your code
hub / github.com/clips/pattern / mult_matrix

Function mult_matrix

pattern/web/pdf/utils.py:13–17  ·  view source on GitHub ↗

Returns the multiplication of two matrices.

((a1,b1,c1,d1,e1,f1), (a0,b0,c0,d0,e0,f0))

Source from the content-addressed store, hash-verified

11MATRIX_IDENTITY = (1, 0, 0, 1, 0, 0)
12
13def mult_matrix((a1,b1,c1,d1,e1,f1), (a0,b0,c0,d0,e0,f0)):
14 """Returns the multiplication of two matrices."""
15 return (a0*a1+c0*b1, b0*a1+d0*b1,
16 a0*c1+c0*d1, b0*c1+d0*d1,
17 a0*e1+c0*f1+e0, b0*e1+d0*f1+f0)
18
19def translate_matrix((a,b,c,d,e,f), (x,y)):
20 """Translates a matrix by (x,y)."""

Callers 4

begin_figureMethod · 0.90
render_stringMethod · 0.90
do_cmMethod · 0.90
do_DoMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…