diff options
author | arades79 <scravers@protonmail.com> | 2023-02-14 17:13:47 +0100 |
---|---|---|
committer | arades79 <scravers@protonmail.com> | 2023-02-14 18:35:39 +0100 |
commit | 683019878fc939b418a65e1c5d84b066596d7655 (patch) | |
tree | 6b2a2e8ea34cb00a3fccf3613a52475550997035 /src/common/tiny_mt.h | |
parent | apply clang-format (diff) | |
download | yuzu-683019878fc939b418a65e1c5d84b066596d7655.tar yuzu-683019878fc939b418a65e1c5d84b066596d7655.tar.gz yuzu-683019878fc939b418a65e1c5d84b066596d7655.tar.bz2 yuzu-683019878fc939b418a65e1c5d84b066596d7655.tar.lz yuzu-683019878fc939b418a65e1c5d84b066596d7655.tar.xz yuzu-683019878fc939b418a65e1c5d84b066596d7655.tar.zst yuzu-683019878fc939b418a65e1c5d84b066596d7655.zip |
Diffstat (limited to '')
-rw-r--r-- | src/common/tiny_mt.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/tiny_mt.h b/src/common/tiny_mt.h index 4689fd55b..5d5ebf158 100644 --- a/src/common/tiny_mt.h +++ b/src/common/tiny_mt.h @@ -223,7 +223,7 @@ public: float GenerateRandomF32() { // Floats have 24 bits of mantissa. - constexpr static u32 MantissaBits = 24; + constexpr u32 MantissaBits = 24; return static_cast<float>(GenerateRandomU24()) * (1.0f / (1U << MantissaBits)); } @@ -234,9 +234,9 @@ public: // Nintendo does not. They use (32 - 5) = 27 bits from the first rnd32() // call, and (32 - 6) bits from the second. We'll do what they do, but // There's not a clear reason why. - constexpr static u32 MantissaBits = 53; - constexpr static u32 Shift1st = (64 - MantissaBits) / 2; - constexpr static u32 Shift2nd = (64 - MantissaBits) - Shift1st; + constexpr u32 MantissaBits = 53; + constexpr u32 Shift1st = (64 - MantissaBits) / 2; + constexpr u32 Shift2nd = (64 - MantissaBits) - Shift1st; const u32 first = (this->GenerateRandomU32() >> Shift1st); const u32 second = (this->GenerateRandomU32() >> Shift2nd); |