Style fix to exponential_decay

This commit is contained in:
Grant Sanderson
2018-07-14 10:31:56 -07:00
parent 393bfc68ce
commit 3ebad5a425

View File

@ -84,23 +84,8 @@ def squish_rate_func(func, a=0.4, b=0.6):
def lingering(t):
return squish_rate_func(lambda t: t, 0, 0.8)(t)
def exponential_decay(t, half_life = 0.1):
# The half-life should be rather small to minimize the cut-off error at the end
return 1 - np.exp(-t/half_life)
def exponential_decay(t, half_life=0.1):
# The half-life should be rather small to minimize
# the cut-off error at the end
return 1 - np.exp(-t / half_life)