lerp
Smoothly transitions between two values based on a factor
54 bytes
Usage
The lerp
function is used to linearly interpolate between two numbers based on a specified amount. This function is particularly useful in animations, graphics, and games for smooth transitions.
Etymology
The name lerp
is short for “linear interpolation”. It’s a term from computer graphics that means “interpolate linearly between two values”.
For more information, check out the Wikipedia article on linear interpolation.