kun-galgame-vue/src/utils/random.ts
2023-06-12 21:57:40 +08:00

6 lines
191 B
TypeScript

// 生成指定范围内的随机数
export const randomNum = (lowerValue: number, upperValue: number) => {
return Math.floor(Math.random() * (upperValue - lowerValue + 1) + lowerValue)
}