MCPcopy
hub / github.com/figma/plugin-samples / multiply

Function multiply

circletext/code.ts:9–14  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

7// The first transform applied is a, followed by b, which
8// is normally written b * a.
9function multiply(a, b) {
10 return [
11 [ a[0][0] * b[0][0] + a[0][1] * b[1][0], a[0][0] * b[0][1] + a[0][1] * b[1][1], a[0][0] * b[0][2] + a[0][1] * b[1][2] + a[0][2] ],
12 [ a[1][0] * b[0][0] + a[1][1] * b[1][0], a[1][0] * b[0][1] + a[1][1] * b[1][1] + 0, a[1][0] * b[0][2] + a[1][1] * b[1][2] + a[1][2] ]
13 ]
14}
15
16// Creates a "move" transform.
17function move(x, y) {

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected