(min, max)
| 25 | * @return {number} The random integers. |
| 26 | */ |
| 27 | export function getRandomInteger(min, max) { |
| 28 | // Note that we don't reuse the implementation in the more generic |
| 29 | // `getRandomIntegers()` (plural) below, for performance optimization. |
| 30 | return Math.floor((max - min) * Math.random()) + min; |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * Generate a given number of random integers >= min and < max. |
no outgoing calls
no test coverage detected