dot.lua 580 B

12345678910111213141516171819202122232425
  1. return {
  2. summary = 'Get the dot product with another vector.',
  3. description = 'Returns the dot product between this vector and another one.',
  4. arguments = {
  5. {
  6. name = 'u',
  7. type = 'Vec2',
  8. description = 'The vector to compute the dot product with.'
  9. }
  10. },
  11. returns = {
  12. {
  13. name = 'dot',
  14. type = 'number',
  15. description = 'The dot product between `v` and `u`.'
  16. }
  17. },
  18. notes = [[
  19. This is computed as:
  20. dot = v.x * u.x + v.y * u.y + v.z * u.z
  21. The vectors are not normalized before computing the dot product.
  22. ]]
  23. }