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

9 lines
148 B
TypeScript
Raw Normal View History

2021-12-17 06:58:07 -06:00
// high excluded
function randomInt (low: number, high: number) {
return Math.floor(Math.random() * (high - low) + low)
}
export {
randomInt
}