Files
lan-manager/web/node_modules/gl-vec2/transformMat4.js
openclaw 0a5f6a8047 Initial commit: Lan-manager project code
- Go backend (server/)
- Frontend (web/, server/static/)
- Database and deployment files
- Scripts and docs

Co-Authored-By: 狸花猫/Claude-Qwen3.6-Plus 🐾
2026-04-20 00:52:58 +08:00

19 lines
484 B
JavaScript

module.exports = transformMat4
/**
* Transforms the vec2 with a mat4
* 3rd vector component is implicitly '0'
* 4th vector component is implicitly '1'
*
* @param {vec2} out the receiving vector
* @param {vec2} a the vector to transform
* @param {mat4} m matrix to transform with
* @returns {vec2} out
*/
function transformMat4(out, a, m) {
var x = a[0],
y = a[1]
out[0] = m[0] * x + m[4] * y + m[12]
out[1] = m[1] * x + m[5] * y + m[13]
return out
}