lerp.js 239 B

1234567891011
  1. /**
  2. * Linear interpolation.
  3. * IMPORTANT:will return `Infinity` if numbers overflow Number.MAX_VALUE
  4. */
  5. function lerp(ratio, start, end){
  6. return start + (end - start) * ratio;
  7. }
  8. module.exports = lerp;