modeling/src/maths/vec4/toString.js

  1. /**
  2. * Convert the given vector to a representative string.
  3. *
  4. * @param {vec4} vec - vector to convert
  5. * @returns {String} representative string
  6. * @alias module:modeling/maths/vec4.toString
  7. */
  8. const toString = (vec) => `(${vec[0].toFixed(9)}, ${vec[1].toFixed(9)}, ${vec[2].toFixed(9)}, ${vec[3].toFixed(9)})`
  9. module.exports = toString