2#include <game/cLib/c_random.hpp>
12 register u32 c, b, a, x;
30 return ((u64)
mSeed * max) >> 32;
35 u32 tmp = 0x3f800000 | (
mSeed >> 9 & 0x7fffff);
36 return (*(
float *)&tmp)-1.0f;
41 u32 tmp = 0x3f800000 | (
mSeed >> 9 & 0x7fffff);
42 return (*(
float *)&tmp)-1.5f;
u32 ranqdStep()
Implementation of the ranqd1 algorithm.
u32 mSeed
The current seed.
float ranqd3()
Generates a floating point number between -0.5 and 0.5.
u32 ranqd1(u32 max)
Generates an integer between 0 and the given max.
static u32 mConst1
Constant a from the ranqd1 algorithm.
static u32 mConst2
Constant c from the ranqd1 algorithm.
float ranqd2()
Generates a floating point number between 0 and 1.