From f29427dd88890450e0225f56f25cbe1bf390dec7 Mon Sep 17 00:00:00 2001 From: chizuki Date: Fri, 22 Jul 2022 14:13:27 +0800 Subject: [PATCH] fix: randomInt max. --- packages/core/src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/utils.ts b/packages/core/src/utils.ts index 13315417..03ae532c 100644 --- a/packages/core/src/utils.ts +++ b/packages/core/src/utils.ts @@ -39,7 +39,7 @@ export function randomInt(min: number, max?: number) { max = min min = 0 } - return Math.floor(Math.random() * (max - min + 1)) + min + return Math.floor(Math.random() * (max - min)) + min } export function randomDate(start: DateLike): Date