1
0
mirror of https://github.com/ialley-workshop-open/uni-halo.git synced 2026-06-12 05:09:29 +08:00
Files
uni-halo/tm-vuetify/tool/function/random.js
T
2022-12-06 15:08:29 +08:00

11 lines
196 B
JavaScript

function random(min, max) {
if (min >= 0 && max > 0 && max >= min) {
let gab = max - min + 1;
return Math.floor(Math.random() * gab + min);
} else {
return 0;
}
}
export default random;