unpack.lua 999 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. raw = {
  9. type = 'boolean',
  10. default = 'false',
  11. description = 'Whether the values should be returned as raw values instead of angle/axis.'
  12. }
  13. },
  14. returns = {
  15. a = {
  16. type = 'number',
  17. description = 'The angle in radians, or the x value.'
  18. },
  19. b = {
  20. type = 'number',
  21. description = 'The x component of the rotation axis or the y value.'
  22. },
  23. c = {
  24. type = 'number',
  25. description = 'The y component of the rotation axis or the z value.'
  26. },
  27. d = {
  28. type = 'number',
  29. description = 'The z component of the rotation axis or the w value.'
  30. }
  31. },
  32. variants = {
  33. {
  34. arguments = { 'raw' },
  35. returns = { 'a', 'b', 'c', 'd' }
  36. }
  37. },
  38. related = {
  39. 'Quat:set'
  40. }
  41. }