qsu
Version:
qsu is a utility library that contains useful and frequently used functions. Start with your preferred language and the modern development environment.
1 lines • 154 B
JavaScript
export function numRandom(n,o){if(!n&&!o)return Math.random()>.5?1:0;const r=o||n,t=!o||n>=o?null:n;return Math.floor(Math.random()*(t?r-t+1:r+1))+(t||0)}