Skip to content

Commit

Permalink
Merge pull request QW-Group#352 from phylter-qw/rng-normalization-fix
Browse files Browse the repository at this point in the history
fix rng normalization
  • Loading branch information
dsvensson authored Jul 29, 2024
2 parents 6861422 + 8808ff7 commit 8a9caca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/g_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void g_random_seed(int seed) {

float g_random()
{
return ((rng_next_global() & 0x7fff) / ((float)0x8000));
return (rng_next_global() >> 8 & 0xffffff) / 16777216.0f;
}

float crandom()
Expand Down

0 comments on commit 8a9caca

Please sign in to comment.