$ ./guess_the_languageGame Dev
Game Dev · medium · #46

What does Lerp do?

float y = Mathf.Lerp(a, b, t);
  1. Linearly interpolate between a and b
  2. Return the larger of a and b
  3. Clamp the value of t to one
  4. Round the result to an int
Lerp blends a→b as t goes 0→1.
Play Game Dev ▸