modeling/src/maths/plane/flip.js

  1. /**
  2. * Flip the given plane.
  3. *
  4. * @param {plane} out - receiving plane
  5. * @param {plane} plane - plane to flip
  6. * @return {plane} out
  7. * @alias module:modeling/maths/plane.flip
  8. */
  9. const flip = (out, plane) => {
  10. out[0] = -plane[0]
  11. out[1] = -plane[1]
  12. out[2] = -plane[2]
  13. out[3] = -plane[3]
  14. return out
  15. }
  16. module.exports = flip