Bug fixes to implementation of Succession animations

This commit is contained in:
Sridhar Ramesh
2018-01-19 13:02:41 -08:00
parent 2d34b2e28b
commit d74127bb7f
2 changed files with 24 additions and 18 deletions

View File

@ -304,6 +304,12 @@ def digest_locals(obj, keys = None):
def interpolate(start, end, alpha):
return (1-alpha)*start + alpha*end
def mid(start, end):
return (start + end)/2.0
def anti_interpolate(start, end, value):
return np.true_divide(value - start, end - start)
def clamp(lower, upper, val):
if val < lower:
return lower