The starting value.
The end value.
The interpolation factor, typically between 0 and 1. A lower value results in slower interpolation, while a higher value makes it faster.
Optional
approximation: number = 0A small threshold to determine when the difference between the interpolated value and the target is negligible. If the difference is within this threshold, the function returns target
directly.
Performs linear interpolation (LERP) between a current value and a target value using an easing factor.
Linear interpolation calculates an intermediate value between
current
andtarget
based on a givenfactor
, providing smooth transitions.