summaryrefslogtreecommitdiffstats
path: root/src/common/tiny_mt.h
diff options
context:
space:
mode:
authorarades79 <scravers@protonmail.com>2023-02-11 19:28:03 +0100
committerarades79 <scravers@protonmail.com>2023-02-14 18:33:11 +0100
commit45e13b03f372230dbf780f3fa87dd88f388af605 (patch)
tree555593e7e5016b6ba2a777d7417ada244abce458 /src/common/tiny_mt.h
parentMerge pull request #9795 from Kelebek1/biquad_fix (diff)
downloadyuzu-45e13b03f372230dbf780f3fa87dd88f388af605.tar
yuzu-45e13b03f372230dbf780f3fa87dd88f388af605.tar.gz
yuzu-45e13b03f372230dbf780f3fa87dd88f388af605.tar.bz2
yuzu-45e13b03f372230dbf780f3fa87dd88f388af605.tar.lz
yuzu-45e13b03f372230dbf780f3fa87dd88f388af605.tar.xz
yuzu-45e13b03f372230dbf780f3fa87dd88f388af605.tar.zst
yuzu-45e13b03f372230dbf780f3fa87dd88f388af605.zip
Diffstat (limited to 'src/common/tiny_mt.h')
-rw-r--r--src/common/tiny_mt.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/tiny_mt.h b/src/common/tiny_mt.h
index 5d5ebf158..4689fd55b 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 u32 MantissaBits = 24;
+ constexpr static 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 u32 MantissaBits = 53;
- constexpr u32 Shift1st = (64 - MantissaBits) / 2;
- constexpr u32 Shift2nd = (64 - MantissaBits) - Shift1st;
+ constexpr static u32 MantissaBits = 53;
+ constexpr static u32 Shift1st = (64 - MantissaBits) / 2;
+ constexpr static u32 Shift2nd = (64 - MantissaBits) - Shift1st;
const u32 first = (this->GenerateRandomU32() >> Shift1st);
const u32 second = (this->GenerateRandomU32() >> Shift2nd);