Math.random() //范围 [ 0 , 1 )
1、Math.round() // 四舍五入
Math.round(Math.random()*3) //范围 [ 0 , 4 ]
2、Math.ceil() // 全入
Math.ceil(Math.random()*3) //范围 [ 1 , 3 ]
3、Math.floor() // 全舍
Math.floor(Math.random()*4) //范围 [ 0 , 3 ]Math.random() //范围 [ 0 , 1 )
1、Math.round() // 四舍五入
Math.round(Math.random()*3) //范围 [ 0 , 4 ]
2、Math.ceil() // 全入
Math.ceil(Math.random()*3) //范围 [ 1 , 3 ]
3、Math.floor() // 全舍
Math.floor(Math.random()*4) //范围 [ 0 , 3 ]您可能感兴趣的与本文相关的镜像
Stable-Diffusion-3.5
Stable Diffusion 3.5 (SD 3.5) 是由 Stability AI 推出的新一代文本到图像生成模型,相比 3.0 版本,它提升了图像质量、运行速度和硬件效率