(min, max, numIntegers)
| 39 | * @return {number[]} The random integers. |
| 40 | */ |
| 41 | export function getRandomIntegers(min, max, numIntegers) { |
| 42 | const output = []; |
| 43 | for (let i = 0; i < numIntegers; ++i) { |
| 44 | output.push(Math.floor((max - min) * Math.random()) + min); |
| 45 | } |
| 46 | return output; |
| 47 | } |
| 48 | |
| 49 | |
| 50 | export function assertPositiveInteger(x, name) { |