mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Move xoshiro_seed debug print to top
In its previous location, it would only print the value of `s` after it had been mutated by `splitmix32` four times, and it doesn't get used after that, so the print isn't very useful. Mixing code and declarations here is fine because starting from a few months ago, we compile with C99 and if we ever need to compile with C90 then it's trivial to add braces surrounding the declarations.
This commit is contained in:
@@ -53,13 +53,13 @@ uint32_t xoshiro_next(void)
|
|||||||
|
|
||||||
void xoshiro_seed(uint32_t s)
|
void xoshiro_seed(uint32_t s)
|
||||||
{
|
{
|
||||||
|
vlog_debug("Xoshiro seeded with %u.", s);
|
||||||
|
|
||||||
const uint32_t s0 = splitmix32(&s);
|
const uint32_t s0 = splitmix32(&s);
|
||||||
const uint32_t s1 = splitmix32(&s);
|
const uint32_t s1 = splitmix32(&s);
|
||||||
const uint32_t s2 = splitmix32(&s);
|
const uint32_t s2 = splitmix32(&s);
|
||||||
const uint32_t s3 = splitmix32(&s);
|
const uint32_t s3 = splitmix32(&s);
|
||||||
seed(s0, s1, s2, s3);
|
seed(s0, s1, s2, s3);
|
||||||
|
|
||||||
vlog_debug("Xoshiro seeded with %u.", s);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
float xoshiro_rand(void)
|
float xoshiro_rand(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user