Lerp speed or lerp time [closed]

Am I right about the fact that lerping can be done over a set period of time or at a speed which will continue until the target is reached?

How are the formulas for the two? Is it something like this?

LERP at speed:

// does not use start value but instead current value
newValue= Lerp (currentValue, targetValue, Time.deltaTime * speed);


LERP over set duration:

//uses startValue and calculates the progress percentage over time
var newValue = Lerp (startValue, targetvalue, percentage);
percentage= (Time.time - startTime) / duration;


If you do have a fixed distance to cover and a fixed speed then you can easily calculate the time to LERP over. Remember the units of speed are units of distance over units of time. Assuming your fundamental units agree (e.g. not mixing miles-per-hour with meters and seconds) then you can get the time to LERP over with a teensy bit of algebra, giving you time=distance/speed.