https://kotlinlang.org logo
Title
u

user

07/17/2022, 8:41 AM
Smart algorithm to randomize a Double in range but with odds I use the following function to generate a random double in a specific range : nextDouble(1.50, 7.00) However, I've been trying to come up with an algorithm to make the randomization have higher probability to generate a double that is close to the 1.50 than it is to 7.00. Yet I don't even know where it starts. Anything come to mind ? Java is also welcome.