mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
Update docString for nextIntRangeInclusive to note un-usual distribution
This commit is contained in:
parent
beb09a9e3e
commit
d5b7836152
@ -108,7 +108,12 @@ export class RandomNumberGenerator {
|
||||
assert(max > min, "rng: max <= min");
|
||||
return Math.floor(this.next() * (max - min) + min);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a number between min and max, inclusive.
|
||||
* note that it will only choose the numbers at the edge half as often
|
||||
* as the rest of the set. For example with 0, 2 as inputs it will
|
||||
* choose 1 twice as often as 0 or two.
|
||||
* @param {number} min
|
||||
* @param {number} max
|
||||
* @returns {number} Integer in range [min, max]
|
||||
|
Loading…
Reference in New Issue
Block a user