mirror of
https://github.com/Cubitect/cubiomes.git
synced 2025-09-24 04:03:39 -04:00
Use int64_t instead of long
This commit is contained in:
parent
0186b530de
commit
801ab62b2b
@ -23,7 +23,7 @@ static inline int nextInt(int64_t *seed, const int n)
|
|||||||
int bits, val;
|
int bits, val;
|
||||||
const int m = n - 1;
|
const int m = n - 1;
|
||||||
|
|
||||||
if((m & n) == 0) return (int) ((n * (long)next(seed, 31)) >> 31);
|
if((m & n) == 0) return (int) ((n * (int64_t)next(seed, 31)) >> 31);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
bits = next(seed, 31);
|
bits = next(seed, 31);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user