I know I’m like almost 7 years late on this, but it still pops up on google searches, so hopefully, this will help someone.
I made a function for a random weighted float generator which could be used to extrapolate to other number generators.
This may not look the most elegant but I’m basically chaining the random generators to make the weighting distribute stronger to one side or the other of a specified range and the number of chain links is determined by the input variable, similar to a weighted boolean.
In the images, you can see that I weight the random float stronger toward the min or max based on its distance from 0.5 in either direction.
Weight 0.5->0 = Stronger weighting toward the Min.
Weight 0.5->1 = Stronger weighting toward the Max.
And I branch the execution based on whether the weight is >= or < 0.5.
This works as a pure function too. Hope I can help someone!
EDIT!: Change the branch bool to a greater equal, NOT less. Sorry.