distance.lua 787 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. return {
  2. summary = 'Get the distance to another vector.',
  3. description = 'Returns the distance to another vector.',
  4. arguments = {
  5. u = {
  6. type = 'Vec2',
  7. description = 'The vector to measure the distance to.'
  8. },
  9. x = {
  10. type = 'number',
  11. description = 'A value of x component to measure distance to.'
  12. },
  13. y = {
  14. type = 'number',
  15. description = 'A value of y component to measure distance to.'
  16. }
  17. },
  18. returns = {
  19. distance = {
  20. type = 'number',
  21. description = 'The distance to `u`.'
  22. },
  23. },
  24. variants = {
  25. {
  26. arguments = { 'u' },
  27. returns = { 'distance' }
  28. },
  29. {
  30. arguments = { 'x', 'y' },
  31. returns = { 'distance' }
  32. }
  33. },
  34. related = {
  35. 'Vec2:angle',
  36. 'Vec2:length'
  37. }
  38. }