rhb-server/mes-ui/rhb-app/node_modules/gl-vec2/inverse.js
2025-10-20 11:14:41 +08:00

15 lines
275 B
JavaScript

module.exports = inverse
/**
* Returns the inverse of the components of a vec2
*
* @param {vec2} out the receiving vector
* @param {vec2} a vector to invert
* @returns {vec2} out
*/
function inverse(out, a) {
out[0] = 1.0 / a[0]
out[1] = 1.0 / a[1]
return out
}