Use most significant bits instead (gives better random)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1381 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
782a61d992
commit
b1404175f0
1 changed files with 1 additions and 1 deletions
|
@ -153,5 +153,5 @@ int rand(void)
|
|||
y ^= (y >> 18);
|
||||
}
|
||||
|
||||
return y & 0x7fffffff; /* 31-bit limit by Björn Stenberg*/
|
||||
return (y & 0xfffffffe) >> 1; /* 31-bit limit by Björn Stenberg*/
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue