zoom in on BrickRowScene

This commit is contained in:
Ben Hambrecht
2018-05-10 00:00:15 +02:00
parent deaf0b1274
commit 76cb6eee28
3 changed files with 50 additions and 6 deletions

View File

@ -82,3 +82,24 @@ 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)