unpack.lua 969 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. return {
  2. summary = 'Get the components of the quaternion.',
  3. description = [[
  4. Returns the components of the quaternion as numbers, either in an angle/axis representation or
  5. as raw quaternion values.
  6. ]],
  7. arguments = {
  8. {
  9. name = 'raw',
  10. type = 'boolean',
  11. default = 'false',
  12. description = 'Whether the values should be returned as raw values instead of angle/axis.'
  13. }
  14. },
  15. returns = {
  16. {
  17. name = 'a',
  18. type = 'number',
  19. description = 'The angle in radians, or the x value.'
  20. },
  21. {
  22. name = 'b',
  23. type = 'number',
  24. description = 'The x component of the rotation axis or the y value.'
  25. },
  26. {
  27. name = 'c',
  28. type = 'number',
  29. description = 'The y component of the rotation axis or the z value.'
  30. },
  31. {
  32. name = 'd',
  33. type = 'number',
  34. description = 'The z component of the rotation axis or the w value.'
  35. }
  36. },
  37. related = {
  38. 'quat:set'
  39. }
  40. }