Skip to content
Snippets Groups Projects
Commit 88887dbe authored by Paul McCarthy's avatar Paul McCarthy
Browse files

transform.concat function can now take any number of matrices.

parent 8cd23d84
No related branches found
No related tags found
No related merge requests found
......@@ -27,9 +27,15 @@ def invert(x):
return linalg.inv(x)
def concat(x1, x2):
"""Combines the two matrices (returns the dot product)."""
return np.dot(x1, x2)
def concat(*xforms):
"""Combines the given matrices (returns the dot product)."""
result = xforms[0]
for i in range(1, len(xforms)):
result = np.dot(result, xforms[i])
return result
def scaleOffsetXform(scales, offsets):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment