Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const get_random_int = (min : number, max : number) : number => {
- if (max < min) {
- throw new Error("Upper bound of random interval has to be bigger than lower bound. Aborting.");
- }
- return Math.floor(Math.random() * (max - min)) + min;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement