Closed n8sh closed 6 years ago
The existing implementation just uses modulo, which is fine when 1L + max - min evenly divides 1L + generator.max, but otherwise causes the result to bias towards low numbers.
1L + max - min
1L + generator.max
Thanks very much!
The existing implementation just uses modulo, which is fine when
1L + max - min
evenly divides1L + generator.max
, but otherwise causes the result to bias towards low numbers.