add.lua 994 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 = 'Vec4',
  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. z = {
  19. type = 'number',
  20. default = 'x',
  21. description = 'A value to add to z component.'
  22. },
  23. w = {
  24. type = 'number',
  25. default = 'x',
  26. description = 'A value to add to w component.'
  27. }
  28. },
  29. returns = {
  30. self = {
  31. type = 'Vec4',
  32. description = 'The modified vector.'
  33. }
  34. },
  35. variants = {
  36. {
  37. arguments = { 'u' },
  38. returns = { 'self' }
  39. },
  40. {
  41. arguments = { 'x', 'y', 'z', 'w' },
  42. returns = { 'self' }
  43. }
  44. },
  45. related = {
  46. 'Vec4:sub',
  47. 'Vec4:mul',
  48. 'Vec4:div'
  49. }
  50. }