add.lua 747 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. return {
  2. summary = 'Add a vector or a number to the vector.',
  3. description = 'Adds a vector or a number to the vector.',
  4. arguments = {
  5. u = {
  6. type = 'Vec2',
  7. description = 'The other vector.'
  8. },
  9. x = {
  10. type = 'number',
  11. description = 'A value to add to x component.'
  12. },
  13. y = {
  14. type = 'number',
  15. default = 'x',
  16. description = 'A value to add to y component.'
  17. }
  18. },
  19. returns = {
  20. v = {
  21. type = 'Vec2',
  22. description = 'The original vector.'
  23. }
  24. },
  25. variants = {
  26. {
  27. arguments = { 'u' },
  28. returns = { 'v' }
  29. },
  30. {
  31. arguments = { 'x', 'y' },
  32. returns = { 'v' }
  33. }
  34. },
  35. related = {
  36. 'Vec2:sub',
  37. 'Vec2:mul',
  38. 'Vec2:div'
  39. }
  40. }