MCPcopy Create free account
hub / github.com/microsoft/SandDance / getScaling

Function getScaling

docs/app/js/sanddance-app.js:73592–73606  ·  view source on GitHub ↗
(out, mat)

Source from the content-addressed store, hash-verified

73590 return out;
73591}
73592function getScaling(out, mat) {
73593 var m11 = mat[0];
73594 var m12 = mat[1];
73595 var m13 = mat[2];
73596 var m21 = mat[4];
73597 var m22 = mat[5];
73598 var m23 = mat[6];
73599 var m31 = mat[8];
73600 var m32 = mat[9];
73601 var m33 = mat[10];
73602 out[0] = Math.hypot(m11, m12, m13);
73603 out[1] = Math.hypot(m21, m22, m23);
73604 out[2] = Math.hypot(m31, m32, m33);
73605 return out;
73606}
73607function getRotation(out, mat) {
73608 var scaling = new _commonJs.ARRAY_TYPE(3);
73609 getScaling(scaling, mat);

Callers 1

getRotationFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected