diff --git a/utils/random.ts b/utils/random.ts new file mode 100644 index 0000000..57b0478 --- /dev/null +++ b/utils/random.ts @@ -0,0 +1,5 @@ +export function randomInt(fromInclusive: number, toExclusive: number): number { + return ( + Math.floor(Math.random() * (toExclusive - fromInclusive)) + fromInclusive + ); +}