MCPcopy
hub / github.com/vercel/next.js / a

Function a

packages/next/src/compiled/postcss-preset-env/index.cjs:14–14  ·  view source on GitHub ↗

* Simple matrix (and vector) multiplication * Warning: No error handling for incompatible dimensions! * @author Lea Verou 2020 MIT License * * @license W3C * https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document * * @copyright This software or document includes material cop

(_,X)

Source from the content-addressed store, hash-verified

12 *
13 * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/multiply-matrices.js
14 */function a(_,X){const ee=_.length;let te,re;te=Array.isArray(_[0])?_:[_],Array.isArray(X[0])||(re=X.map((_=>[_])));const se=re[0].length,ne=re[0].map(((_,X)=>re.map((_=>_[X]))));let ie=te.map((_=>ne.map((X=>Array.isArray(_)?_.reduce(((_,ee,te)=>_+ee*(X[te]||0)),0):X.reduce(((X,ee)=>X+ee*_),0)))));return 1===ee&&(ie=ie[0]),1===se?ie.map((_=>_[0])):ie}
15/**
16 * @license W3C
17 * https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document

Callers 15

cFunction · 0.70
iFunction · 0.70
lFunction · 0.70
pFunction · 0.70
fFunction · 0.70
gFunction · 0.70
wFunction · 0.70
IFunction · 0.70
SFunction · 0.70
rFunction · 0.70
sFunction · 0.70
dFunction · 0.70

Calls 14

isArrayMethod · 0.80
reduceMethod · 0.80
replaceWithMethod · 0.80
iFunction · 0.70
bFunction · 0.70
dFunction · 0.70
tFunction · 0.70
mapMethod · 0.45
indexOfMethod · 0.45
appendMethod · 0.45
filterMethod · 0.45
forEachMethod · 0.45

Tested by

no test coverage detected