import { makeRandomInt } from './makeRandomInt.js';
export function makeRandomIntArray(intsBetweenStart, intsBetweenEnd, length) {
    const intSet = new Set();
    let retr = [];
    if (length !== undefined && intsBetweenEnd - intsBetweenStart <= length) {
        while (intSet.size != length) {
            intSet.add(makeRandomInt(intsBetweenStart, intsBetweenEnd));
        }
        retr = Array.from(intSet);
    }
    else {
        length = makeRandomInt(intsBetweenStart, intsBetweenEnd);
        while (intSet.size != length) {
            intSet.add(makeRandomInt(intsBetweenStart, intsBetweenEnd));
        }
        retr = Array.from(intSet);
    }
    return retr;
}
