def halton_seq(prime, index=1):
    """ Low discrepancy halton sequence with a given prime """
    r, f, i = 0.0, 1.0, index
    while i > 0:
        f /= prime
        r += f * (i % prime)
        i = int(i / float(prime))
    return r
 Low discrepancy halton sequence with a given prime 
metadrive/render_pipeline/rpplugins/smaa/jitters.py