static float ExponentialDecay (float current, float target, float halflife, float deltaTime)

Parameters

NameTypeDescription
current float Current value
target float Target value to approach
halflife float Time for the difference to reduce by 50%
deltaTime float Time step

Returns

TypeDescription
float
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.