Files
NapCatQQ/.pnpm-store/v3/files/6c/01241608aa04bd094682682da24f0500fd2177f0e8e03ce2b289f96c13ae947e16dbdd039f63ef0f6cf8e947197de714c0e85cc7ff51aaa1ca7711debe7019
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

18 lines
367 B
Plaintext

// src/numbers.ts
function range(start, end) {
const length = end - start + 1;
return Array.from({ length }, (_, index) => index + start);
}
function clamp(value, min, max) {
return Math.min(Math.max(value, min), max);
}
function clampPercentage(value, max = 100) {
return Math.min(Math.max(value, 0), max);
}
export {
range,
clamp,
clampPercentage
};