400 B
400 B
title | localeTitle |
---|---|
Math Random | 数学随机 |
数学随机
Math.random()
返回0(包括)和1(不包括)之间的数字。
句法
Math.random()
例
function randomInRange(min, max) {
return Math.random() * (max - min) + min;
}