明树Git Lab

Commit 2e09eec3 authored by zfp1's avatar zfp1

update

parent a7961e3c
...@@ -133,12 +133,14 @@ function getSeasonMois() { ...@@ -133,12 +133,14 @@ function getSeasonMois() {
} }
function adjustToRange(n, [min, max]) { function adjustToRange(n, [min, max]) {
let v;
if (n >= min && n <= max) { if (n >= min && n <= max) {
return n; v = n;
} else { } else {
return Math.random() * (max - min) + min; v = Math.random() * (max - min) + min;
} }
v = Math.round(v * 100) / 100;
return _.isInteger(v) ? parseInt(v) : v;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment