samedi 13 août 2022

Method that returns a weighted random value based on input [closed]

I am struggling to think of a way to implement a method that takes a number ranging from [0,100] and returns a number ranging from [0,10]. Such that it is more likely to return a high value if the input value is high and vice versa. I also want the PDF of the method to be continuous, so an input of 11 should give you slightly different odds than an input of 12. Any tips/tricks on how to logically implement such a method will be greatly appreciated.




Aucun commentaire:

Enregistrer un commentaire