Given 2 numbers, 1000 and 5000 for example, how can I write a fast psuedo-random that would be increasingly less likely produce higher numbers?
I was thinking something on the lines of decreasing the rate at which a higher number is returns based on a factor, such as 1.0/5000*1000.
I can't seem to put my idea into code, can anyone help?
Aucun commentaire:
Enregistrer un commentaire