mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2025-01-10 13:07:17 +00:00
rng bugfix
This commit is contained in:
parent
1cc7ed8b2b
commit
e4d35f3664
|
@ -5,7 +5,7 @@ pub trait RNG {
|
|||
fn next(&self) -> i32;
|
||||
|
||||
fn range(&self, range: Range<i32>) -> i32 {
|
||||
range.start + ((self.next() & 0x7fffffff) % (range.len() as i32))
|
||||
range.start + ((self.next() & 0x7fffffff) % (range.len() as i32 + 1))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue