一天一点新东西-处女笔
随机数区间公式
Math.random()*(max - min) + min
保留小数点后几位
formatFloat:function(src, pos) {
return Math.round(src*Math.pow(10, pos))/Math.pow(10, pos);
}
随机数区间公式
Math.random()*(max - min) + min
保留小数点后几位
formatFloat:function(src, pos) {
return Math.round(src*Math.pow(10, pos))/Math.pow(10, pos);
}