def lerp(a, b, c):
    """
    Linearly interpolates between a and b at point c. Where lerp(a, b, 0) = a and lerp(a, b, 1) = b.
    """
    assert 0 <= c <= 1, "c must be between 0 and 1"
    return (b*c) + ((1-c) * a)