mul.lua 942 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. return {
  2. summary = 'Multiply a quaternion by another quaternion or a vector.',
  3. description = [[
  4. Multiplies this quaternion by another value. If the value is a quaternion, the rotations in the
  5. two quaternions are applied sequentially and the result is stored in the first quaternion. If
  6. the value is a vector, then the input vector is rotated by the quaternion and returned.
  7. ]],
  8. arguments = {
  9. r = {
  10. type = 'Quat',
  11. description = 'A quaternion to combine with the original.'
  12. },
  13. v3 = {
  14. type = 'Vec3',
  15. description = 'A vector to rotate.'
  16. }
  17. },
  18. returns = {
  19. self = {
  20. type = 'Quat',
  21. description = 'The modified quaternion.'
  22. },
  23. v3 = {
  24. type = 'Vec3',
  25. description = 'The rotated vector.'
  26. }
  27. },
  28. variants = {
  29. {
  30. arguments = { 'r' },
  31. returns = { 'self' }
  32. },
  33. {
  34. arguments = { 'v3' },
  35. returns = { 'v3' }
  36. }
  37. }
  38. }