<分区>
在Documentation Random.NextDouble
是这么写的
返回一个介于 0.0 和 1.0 之间的随机数。
我想问一下,有没有可能在任何情况下它都会返回1
?
最佳答案
否 - 根据文档,零是包容性的,但 1 不是:
A double-precision floating point number greater than or equal to 0.0, and less than 1.0.
关于c# - Random.NextDouble 方法可以返回 '1.0' 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14030414/