def interpolate ( f1 : float , f2 : float , factor : float ) -> float : return f1 + ( f2 - f1 ) * factor
blender python fcurves interpolation
Linearly interpolate between two float values .
def interpolate(f1: float, f2: float, factor: float) -> float:
    """ Linearly interpolate between two float values. """
    return f1 + (f2 - f1) * factor