COMMON: Add a signed variant of getRandomNumberRng.
Useful for generating negative numbers
This commit is contained in:
parent
bf46d8e677
commit
18626c2e96
2 changed files with 12 additions and 0 deletions
|
@ -59,4 +59,8 @@ uint RandomSource::getRandomNumberRng(uint min, uint max) {
|
|||
return getRandomNumber(max - min) + min;
|
||||
}
|
||||
|
||||
int RandomSource::getRandomNumberRngSigned(int min, int max) {
|
||||
return getRandomNumber(max - min) + min;
|
||||
}
|
||||
|
||||
} // End of namespace Common
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue