modeling/src/maths/vec4/copy.js

  1. /**
  2. * Create a copy of the given vector.
  3. *
  4. * @param {vec4} out - receiving vector
  5. * @param {vec4} vector - source vector
  6. * @returns {vec4} out
  7. * @alias module:modeling/maths/vec4.copy
  8. */
  9. const copy = (out, vector) => {
  10. out[0] = vector[0]
  11. out[1] = vector[1]
  12. out[2] = vector[2]
  13. out[3] = vector[3]
  14. return out
  15. }
  16. module.exports = copy