We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1eed373 commit 3117fdaCopy full SHA for 3117fda
1 file changed
src/Probability.php
@@ -40,7 +40,8 @@ public static function isValid($value)
40
*/
41
public static function generateRandomWithChance()
42
{
43
- return new static(rand(self::MINIMAL_CHANCE, self::CERTAIN));
+ //$chances array, in getOutcome(), starts from index 0, and random can be from 1 to 100;
44
+ return new static(rand(self::MINIMAL_CHANCE, self::CERTAIN) - 1);
45
}
46
47
/**
0 commit comments