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:
Björn Stenberg 2002-07-18 11:24:54 +00:00
parent 782a61d992
commit b1404175f0

View file

@ -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*/
}