获取随机数

2024-03-01


double ranNum = Math.random(); 
结果:[0.0, 1.0)
double ranNum = Math.random() * (b - a + 1) + a;
结果:[a, b]


{/if}