What value does this return?
x = lerp(a, b, 0.5);
- The midpoint between a and b
- The larger of the values a and b
- A random value between a and b
- The exact distance from a to b
Linear interpolation at t=0.5 returns the value halfway between a and b.
Play Game Dev ▸