Make Random Numbers Tend / Average to a Specific Value

前端 未结 3 659

How can I for example generate a list of random numbers between 0 and 1, but have them avarage at 0.8?

I have written this little script in C++ that\'ll tell you wh

3条回答
  •  借酒劲吻你
    2020-12-22 06:47

    Raise your number to the .321928 power will make the average .8 and still range from 0-1.

提交回复
热议问题