vec2.lua 834 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. return {
  2. tag = 'vectors',
  3. summary = 'Create a temporary Vec2.',
  4. description = [[
  5. Creates a temporary 2D vector. This function takes the same arguments as `Vec2: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. u = {
  19. type = 'Vec2',
  20. description = 'A vector to copy the values from.'
  21. }
  22. },
  23. returns = {
  24. v = {
  25. type = 'Vec2',
  26. description = 'The new vector.'
  27. }
  28. },
  29. variants = {
  30. {
  31. arguments = { 'x', 'y' },
  32. returns = { 'v' }
  33. },
  34. {
  35. arguments = { 'u' },
  36. returns = { 'v' }
  37. }
  38. },
  39. related = {
  40. 'lovr.math.newVec2',
  41. 'Vec2',
  42. 'Vectors'
  43. }
  44. }