Returns a random 32-bit value that is less than the given upper bound. This matches Rust's behavior when called with u32 type.
Uses Lemire's "nearly divisionless" method with 32-bit arithmetic.
The random number generator to use
The upper bound for the randomly generated value. Must be non-zero and fit in u32.
A random u32 value in the range [0, upperBound).
Returns a random 32-bit value that is less than the given upper bound. This matches Rust's behavior when called with u32 type.
Uses Lemire's "nearly divisionless" method with 32-bit arithmetic.