UNPKG
md5-fight-plus
Version:
latest (1.2.0)
1.2.0
1.1.3
1.1.2
1.1.1
1.1.0
1.0.9
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
md5-fight-plus
/
src
/
skills
/
utils
/
index.ts
11 lines
(9 loc)
•
287 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
export
function
getRandomScope
(
start
:
number
,
end
:
number
):
number
{
// 确保 start 小于 end
if
(start >= end) {
throw
new
Error
(
"start 必须小于 end"
); }
// 生成随机整数
const
random =
Math
.
floor
(
Math
.
random
() * (end - start +
1
)) + start;
return
random; }