def _interpolate(a, b, fraction):
    """
    Calculate the intermediate value between two values, a and b, if we
    are fraction of the way from a to b
    :param a: Initial value
    :param b: Final value
    :param fraction: How much of b vs. a. 0.0 implies all a. 1.0 means all b
    :return: The intermediate value between a and b
    """
    delta = (b - a) * fraction
    return a + delta