vec4.lua 1.0 KB

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