PeerTube/shared/core-utils/common/random.ts

9 lines
148 B
TypeScript

// high excluded
function randomInt (low: number, high: number) {
return Math.floor(Math.random() * (high - low) + low)
}
export {
randomInt
}