set.lua 785 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. u = {
  16. type = 'Vec2',
  17. description = 'The vector to copy the values from.'
  18. }
  19. },
  20. returns = {
  21. v = {
  22. type = 'Vec2',
  23. description = 'The input vector.'
  24. }
  25. },
  26. variants = {
  27. {
  28. arguments = { 'x', 'y' },
  29. returns = { 'v' }
  30. },
  31. {
  32. arguments = { 'u' },
  33. returns = { 'v' }
  34. }
  35. },
  36. related = {
  37. 'Vec2:unpack'
  38. }
  39. }