18

请问下,比较简单的实现 0.5 到 2 之间的随机数的方法

 3 years ago
source link: https://www.v2ex.com/t/724860
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
程序员 - @ukipoi - 要求就是 扩大一倍或者缩小一倍,两边的概率相同。</br></br>这个可以用 Math.radom(),仅以数学的方式,一行就完成吗?</br></br>我好像只能先随机出是扩大还是

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK