lerp.lua 897 B

12345678910111213141516171819202122232425262728293031
  1. return {
  2. summary = 'Moves this vector some amount towards another one.',
  3. description = [[
  4. Performs a linear interpolation between this vector and another one, which can be used to
  5. smoothly animate between two vectors, based on a parameter value. A parameter value of `0` will
  6. leave the vector unchanged, a parameter value of `1` will set the vector to be equal to the
  7. input vector, and a value of `.5` will set the components to be halfway between the two vectors.
  8. ]],
  9. arguments = {
  10. {
  11. name = 'u',
  12. type = 'Vec4',
  13. description = 'The vector to lerp towards.'
  14. },
  15. {
  16. name = 't',
  17. type = 'number',
  18. description = 'The lerping parameter.'
  19. }
  20. },
  21. returns = {
  22. {
  23. name = 'v',
  24. type = 'Vec4',
  25. description = 'The original vector, containing the new lerped values.'
  26. }
  27. },
  28. related = {
  29. 'Quat:slerp'
  30. }
  31. }