Let’s say we want things to ease within 30 seconds… (Could be faster or slower, but picking a number helps). Call that duration d
So if we get delta, we start accumulation. So push it into a “total time”: tt += delta
If we find the ratio of tt to d, that’s how far into the duration we’ve gone… So let’s say delta is 300 milliseconds or .003 seconds. So we do the math of tt/d or .003/30, that’s t in 0..1
Next round, we get delta and add it again, and now it’s (for instance .003 again delta) so now tt/d aka t is .006/30 etc etc …
(If t > 1, then we are done, we’ve synced or should have. Phase should be zero)
Clear?