MCPcopy Create free account
hub / github.com/esengine/esengine / multiplyMatrices

Function multiplyMatrices

scripts/test-fbxloader-bindpose.mjs:29–41  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

27}
28
29function multiplyMatrices(a, b) {
30 const result = new Float32Array(16);
31 for (let row = 0; row < 4; row++) {
32 for (let col = 0; col < 4; col++) {
33 let sum = 0;
34 for (let k = 0; k < 4; k++) {
35 sum += a[row + k * 4] * b[k + col * 4];
36 }
37 result[row + col * 4] = sum;
38 }
39 }
40 return result;
41}
42
43function identity() {
44 return new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected