You’re Using Lerp Wrong

Matt Harzewski
The Startup
Published in
5 min readJan 24, 2021

--

Linear interpolation, or “lerp” for short, is a technique commonly used when programming things like games or GUIs. In principle, a lerp function “eases” the transition between two values over time, using some simple math. This could be used to slide a character between two coordinates, or to animate a change in size or opacity of a UI element. If you lerped between two colors, you’d get a gradient. The Unity game engine includes helper functions for Lerp in the Vector, Quaternion and floating point Math classes.

--

--