cross.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. return {
  2. summary = 'Get the cross product with another vector.',
  3. description = [[
  4. Sets this vector to be equal to the cross product between this vector and another one. The
  5. new `v` will be perpendicular to both the old `v` and `u`.
  6. ]],
  7. arguments = {
  8. u = {
  9. type = 'Vec3',
  10. description = 'The vector to compute the cross product with.'
  11. },
  12. x = {
  13. type = 'number',
  14. description = 'A value of x component to compute cross product with.'
  15. },
  16. y = {
  17. type = 'number',
  18. description = 'A value of y component to compute cross product with.'
  19. },
  20. z = {
  21. type = 'number',
  22. description = 'A value of z component to compute cross product with.'
  23. }
  24. },
  25. returns = {
  26. v = {
  27. type = 'Vec3',
  28. description = 'The original vector, with the cross product as its values.'
  29. }
  30. },
  31. variants = {
  32. {
  33. arguments = { 'u' },
  34. returns = { 'v' }
  35. },
  36. {
  37. arguments = { 'x', 'y', 'z' },
  38. returns = { 'v' }
  39. }
  40. },
  41. notes = 'The vectors are not normalized before or after computing the cross product.',
  42. related = {
  43. 'Vec3:dot'
  44. }
  45. }