| 83 | } |
| 84 | |
| 85 | bool CheckByRatio(unsigned int base, unsigned int ratio) { |
| 86 | if (base == 0 || ratio == 0) { |
| 87 | return false; |
| 88 | } else if (ratio >= base) { |
| 89 | return true; |
| 90 | } |
| 91 | |
| 92 | unsigned int n = GetFastRandom() % base; |
| 93 | return n < ratio; |
| 94 | } |
| 95 | |
| 96 | unsigned int RandomPicker(unsigned int maxVal) { |
| 97 | return RandomPicker(0, maxVal); |
nothing calls this directly
no test coverage detected