newVec4.lua 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. return {
  2. tag = 'vectors',
  3. summary = 'Create a new Vec4.',
  4. description = 'Creates a new 4D vector. This function takes the same arguments as `Vec4:set`.',
  5. arguments = {
  6. x = {
  7. type = 'number',
  8. default = '0',
  9. description = 'The x value of the vector.'
  10. },
  11. y = {
  12. type = 'number',
  13. default = 'x',
  14. description = 'The y value of the vector.'
  15. },
  16. z = {
  17. type = 'number',
  18. default = 'x',
  19. description = 'The z value of the vector.'
  20. },
  21. w = {
  22. type = 'number',
  23. default = 'x',
  24. description = 'The w value of the vector.'
  25. },
  26. u = {
  27. type = 'Vec4',
  28. description = 'A vector to copy the values from.'
  29. }
  30. },
  31. returns = {
  32. v = {
  33. type = 'Vec4',
  34. description = 'The new vector.'
  35. }
  36. },
  37. variants = {
  38. {
  39. arguments = { 'x', 'y', 'z', 'w' },
  40. returns = { 'v' }
  41. },
  42. {
  43. arguments = { 'u' },
  44. returns = { 'v' }
  45. }
  46. },
  47. related = {
  48. 'lovr.math.vec4',
  49. 'Vec4',
  50. 'Vectors'
  51. }
  52. }