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

What value does this return?

x = lerp(a, b, 0.5);
  1. The midpoint between a and b
  2. The larger of the values a and b
  3. A random value between a and b
  4. The exact distance from a to b
Linear interpolation at t=0.5 returns the value halfway between a and b.
Play Game Dev ▸