matrixMultiply = (...args) => {
  // If no matrices are given, return an identity matrix
  if (args.length === 0) {
    return svg.createSVGMatrix()
  }

  const m = args.reduceRight((prev, curr) => curr.multiply(prev))

  // Round near-zero values to zero
  if (Math.abs(m.a) < NEAR_ZERO) m.a = 0
  if (Math.abs(m.b) < NEAR_ZERO) m.b = 0
  if (Math.abs(m.c) < NEAR_ZERO) m.c = 0
  if (Math.abs(m.d) < NEAR_ZERO) m.d = 0
  if (Math.abs(m.e) < NEAR_ZERO) m.e = 0
  if (Math.abs(m.f) < NEAR_ZERO) m.f = 0

  return m
}
Multiplies multiple matrices together (m1 * m2 * ...).
Near-zero values are rounded to zero.
@function matrixMultiply
@param {...SVGMatrix} args - The matrices to multiply
@returns {SVGMatrix} The resulting matrix