The general equation for linear interpolation is your second one.
Output = (1 - t) * Input1 + t * Input2
It can nicely be expanded to higher degrees (see Bezier curves) and vectorized. Just treat the vector as a collection of parallel interpolations.
As to why your value is slightly off, your `Time.deltaTime` for the first frame was probably just a little faster than 20ms. Really I wound't focus that much on it unless you need exactly 8%.
If you need to calculate `t`, then Unity has a built-in fuction for that:
t = Mathf.InverseLerp ( Input1 , Input2 , Output);
and the actual calculation for that looks something like:
t = (Output - Input1) / (Input2 - Input1)
↧