length.lua 411 B

123456789101112131415161718192021
  1. return {
  2. summary = 'Get the length of the vector.',
  3. description = 'Returns the length of the vector.',
  4. arguments = {},
  5. returns = {
  6. {
  7. name = 'length',
  8. type = 'number',
  9. description = 'The length of the vector.'
  10. }
  11. },
  12. notes = [[
  13. The length is equivalent to this:
  14. math.sqrt(v.x * v.x + v.y * v.y)
  15. ]],
  16. related = {
  17. 'Vec2:normalize',
  18. 'Vec2:distance'
  19. }
  20. }