rotate.lua 994 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. return {
  2. summary = 'Apply a rotation to the vector.',
  3. description = 'Applies a rotation to the vector, using a `Quat` or an angle/axis rotation.',
  4. arguments = {
  5. q = {
  6. type = 'Quat',
  7. description = 'The quaternion to apply.'
  8. },
  9. angle = {
  10. type = 'number',
  11. description = 'The number of radians to rotate.'
  12. },
  13. ax = {
  14. type = 'number',
  15. description = 'The x component of the axis to rotate around.'
  16. },
  17. ay = {
  18. type = 'number',
  19. description = 'The y component of the axis to rotate around.'
  20. },
  21. az = {
  22. type = 'number',
  23. description = 'The z component of the axis to rotate around.'
  24. }
  25. },
  26. returns = {
  27. self = {
  28. type = 'Vec3',
  29. description = 'The modified vector.'
  30. }
  31. },
  32. variants = {
  33. {
  34. arguments = { 'q' },
  35. returns = { 'self' }
  36. },
  37. {
  38. arguments = { 'angle', 'ax', 'ay', 'az' },
  39. returns = { 'self' }
  40. }
  41. },
  42. related = {
  43. 'Quat:mul'
  44. }
  45. }