I have a velocty variable, and I want it to get reduced constantly over time so that every second it becomes equal to $x\%$ of it's initial value. I can update the variable periodically, but the time between updates is subject to fluctuations (e.g.: the framrate in a videogame), how do I account for that?
I realized that computing:
$$vel = vel * 0.9 * timeDelta$$
Doesn't reduce the velocity by 10% over a second. In fact, depending on the values of $timeDelta$, the value of $vel$ after a second falls within a certain range.
Edit: As @PhilH pointed out, $timeDelta$ should be an exponent of $0.9$ (or, in general, whatever the reduction is). So, on every update, $vel$ should be updated like this $$vel = vel * 0.9^{timeDelta}$$