我找不到解决方案,从中找到随机浮点数[0,a],其中a是用户定义的浮点数.
[0,a]
a
我尝试了以下内容,但它似乎无法正常工作.
float x=(float)rand()/((float)RAND_MAX/a)
c random
c ×1
random ×1