dot.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. u = {
  6. type = 'Vec3',
  7. description = 'The vector to compute the dot product with.'
  8. },
  9. x = {
  10. type = 'number',
  11. description = 'A value of x component to compute the dot product with.'
  12. },
  13. y = {
  14. type = 'number',
  15. description = 'A value of y component to compute the dot product with.'
  16. },
  17. z = {
  18. type = 'number',
  19. description = 'A value of z component to compute the dot product with.'
  20. }
  21. },
  22. returns = {
  23. dot = {
  24. type = 'number',
  25. description = 'The dot product between `v` and `u`.'
  26. }
  27. },
  28. variants = {
  29. {
  30. arguments = { 'u' },
  31. returns = { 'dot' }
  32. },
  33. {
  34. arguments = { 'x', 'y', 'z' },
  35. returns = { 'dot' }
  36. }
  37. },
  38. notes = [[
  39. This is computed as:
  40. dot = v.x * u.x + v.y * u.y + v.z * u.z
  41. The vectors are not normalized before computing the dot product.
  42. ]],
  43. related = {
  44. 'Vec3:cross'
  45. }
  46. }