set.lua 1023 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. return {
  2. summary = 'Set the components of the vector.',
  3. description = 'Sets the components of the vector, either from numbers or an existing vector.',
  4. arguments = {
  5. x = {
  6. type = 'number',
  7. default = '0',
  8. description = 'The new x value of the vector.'
  9. },
  10. y = {
  11. type = 'number',
  12. default = 'x',
  13. description = 'The new y value of the vector.'
  14. },
  15. z = {
  16. type = 'number',
  17. default = 'x',
  18. description = 'The new z value of the vector.'
  19. },
  20. w = {
  21. type = 'number',
  22. default = 'x',
  23. description = 'The new w value of the vector.'
  24. },
  25. u = {
  26. type = 'Vec4',
  27. description = 'The vector to copy the values from.'
  28. }
  29. },
  30. returns = {
  31. v = {
  32. type = 'Vec4',
  33. description = 'The input vector.'
  34. }
  35. },
  36. variants = {
  37. {
  38. arguments = { 'x', 'y', 'z', 'w' },
  39. returns = { 'v' }
  40. },
  41. {
  42. arguments = { 'u' },
  43. returns = { 'v' }
  44. }
  45. },
  46. related = {
  47. 'Vec4:unpack'
  48. }
  49. }