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

Function vec3_transformMat4AsVector

docs/app/js/sanddance-app.js:70140–70149  ·  view source on GitHub ↗
(out, a, m)

Source from the content-addressed store, hash-verified

70138 return out;
70139}
70140function vec3_transformMat4AsVector(out, a, m) {
70141 const x = a[0];
70142 const y = a[1];
70143 const z = a[2];
70144 const w = m[3] * x + m[7] * y + m[11] * z || 1.0;
70145 out[0] = (m[0] * x + m[4] * y + m[8] * z) / w;
70146 out[1] = (m[1] * x + m[5] * y + m[9] * z) / w;
70147 out[2] = (m[2] * x + m[6] * y + m[10] * z) / w;
70148 return out;
70149}
70150function vec3_transformMat2(out, a, m) {
70151 const x = a[0];
70152 const y = a[1];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected