Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
7 lines (6 sloc) 180 Bytes
def lerp(i, speed, start, end, smooth = True):
speed -= 1
p = 1.0/speed*i
if smooth:
p = ((p) * (p) * (3 - 2 * (p)))
return start + (end - start) * p