11 Random(
u32 seed) : m_x(seed), m_seed(seed) {}
19 [[nodiscard]]
u32 getU32() {
21 return static_cast<u32>(m_x >> 0x20);
24 [[nodiscard]]
u32 getU32(
u32 range) {
26 return ((m_x >> 0x20) * range) >> 0x20;
29 [[nodiscard]] f32 getF32() {
30 return MUL *
static_cast<f32
>(getU32());
33 [[nodiscard]] f32 getF32(f32 range) {
34 return range * getF32();
41 static constexpr u64 A = 0x690379B2B2E3D431;
42 static constexpr u32 C = 0x508EBD;
43 static constexpr f32 MUL = 1.0f / 4294967296.0f;