2
0

normalize.lua 638 B

12345678910111213141516171819202122232425
  1. return {
  2. summary = 'Normalize the length of the quaternion to 1.',
  3. description = 'Adjusts the values in the quaternion so that its length becomes 1.',
  4. arguments = {},
  5. returns = {
  6. self = {
  7. type = 'Quat',
  8. description = 'The normalized quaternion.'
  9. }
  10. },
  11. variants = {
  12. {
  13. arguments = {},
  14. returns = { 'self' }
  15. }
  16. },
  17. notes = [[
  18. A common source of bugs with quaternions is to forget to normalize them after performing a
  19. series of operations on them. Try normalizing a quaternion if some of the calculations aren't
  20. working quite right!
  21. ]],
  22. related = {
  23. 'Quat:length'
  24. }
  25. }