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

Function maxDiffFromIdentity

scripts/test-fbxloader-bindpose.mjs:55–62  ·  view source on GitHub ↗
(m)

Source from the content-addressed store, hash-verified

53}
54
55function maxDiffFromIdentity(m) {
56 const id = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
57 let maxDiff = 0;
58 for (let i = 0; i < 16; i++) {
59 maxDiff = Math.max(maxDiff, Math.abs(m[i] - id[i]));
60 }
61 return maxDiff;
62}
63
64async function main() {
65 const { FBXLoader } = await import('../packages/asset-system/dist/index.js');

Callers 1

mainFunction · 0.85

Calls 1

maxMethod · 0.45

Tested by

no test coverage detected