import { reverse_bits_uint32 } from "../../binary/reverse_bits_uint32.js";

/**
 * Base-2 radical inverse Van der Corput
 * @see [warren01]  Hacker's Delight, Henry S. Warren, 2001, ISBN:0201914654
 * @param {number} i
 * @returns {number}
 */
export function radical_inverse_VdC_base_2(i) {
    const reverse_int32 = reverse_bits_uint32(i) >>> 0;


     // / 0x100000000 or / 4294967296
    return reverse_int32 * 2.3283064365386963e-10;
}