def window_decay(d: float, a: float):
    """
    Only considers customers that are at most distance 'a' from the current customer.

    f(d) = 1/[d < a]

    :param d: distance (non-negative finite value)
    :param a: maximum distance
    :return: decay
    """
    return 1 if d < a else 0