Generating random numbers based on a probability function

后端 未结 0 1437
夕颜
夕颜 2021-01-22 04:32

We can generate random numbers in an interval x in [a,b] easily if we want to make it uniformely:

rand()*(b-a) + a,

where rand() is a function which can generate a

相关标签:
回答
  • 消灭零回复
提交回复
热议问题