p sets the threshold for picking b. The higher the value (up to 1),
the more likely b will be picked.
// 50% of the time it will return 100, 50% 110 chance(0.5, 100, 110); // 90% of the time it will yield 110, 10% it will yield 100 chance(0.9, 100, 110);
Chance of returning
a
orb
, based on thresholdp
.p
sets the threshold for pickingb
. The higher the value (up to 1), the more likelyb
will be picked.