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