11 Random(
u32 seed) : m_x(seed), m_seed(seed) {}
21 [[nodiscard]]
u32 getU32() {
23 return static_cast<u32>(m_x >> 0x20);
26 [[nodiscard]]
u32 getU32(
u32 range) {
28 return ((m_x >> 0x20) * range) >> 0x20;
31 [[nodiscard]] f32 getF32() {
32 return MUL *
static_cast<f32
>(getU32());
35 [[nodiscard]] f32 getF32(f32 range) {
36 return range * getF32();
43 static constexpr u64 A = 0x690379B2B2E3D431;
44 static constexpr u32 C = 0x508EBD;
45 static constexpr f32 MUL = 1.0f / 4294967296.0f;