5 ms·
I also do this often, but taking inspiration from "The Dice Man", I assign weights to options (0.3 for one option, 0.6 to another, 0.1 for the third - I assign
by flixic 14y ago
I also do this often, but taking inspiration from "The Dice Man", I assign weights to options (0.3 for one option, 0.6 to another, 0.1 for the third - I assign weight very quickly, without much consideration), launch calculator and press Random button.
If 0.4 comes up, second option wins (over 0.3, less than 0.9).
- devcpp 14y agoAnd this is exactly how we generate random values with a certain distribution.