[-] Remove #if 0s from AuRandomDevice (finished working on the rng upgrades)

This commit is contained in:
Reece Wilson 2023-11-18 11:19:57 +00:00
parent daeb5ba06f
commit 2d58f8fdef

View File

@ -178,10 +178,6 @@ namespace Aurora::RNG
AuInt32 RandomDevice::NextInt(AuInt32 uMin, AuInt32 uMax)
{
#if 0
auto range = uMax - uMin;
return (NextU64() % range) + uMin;
#else
auto uRange = uMax - uMin;
auto uMassiveWord = NextU32();
auto uUpperBound = RngConvertBounds(uRange + 1);
@ -191,15 +187,10 @@ namespace Aurora::RNG
uMassiveWord = AuFnv1a32Runtime(&uMassiveWord, sizeof(uMassiveWord));
}
return uMin + uNext;
#endif
}
AuUInt32 RandomDevice::NextU32(AuUInt32 uMin, AuUInt32 uMax)
{
#if 0
auto range = uMax - uMin;
return (NextU64() % range) + uMin;
#else
auto uRange = uMax - uMin;
auto uMassiveWord = NextU32();
auto uUpperBound = RngConvertBounds(uRange + 1);
@ -209,7 +200,6 @@ namespace Aurora::RNG
uMassiveWord = AuFnv1a32Runtime(&uMassiveWord, sizeof(uMassiveWord));
}
return uMin + uNext;
#endif
}
double RandomDevice::NextDecimal()
@ -219,9 +209,6 @@ namespace Aurora::RNG
AuUInt32 RandomDevice::NextIndex(AuUInt32 uCount /* = max + 1*/)
{
#if 0
return NextU32() % uCount;
#else
auto uMassiveWord = NextU32();
auto uUpperBound = RngConvertBounds(uCount);
AuUInt32 uNext {};
@ -230,7 +217,6 @@ namespace Aurora::RNG
uMassiveWord = AuFnv1a32Runtime(&uMassiveWord, sizeof(uMassiveWord));
}
return uNext;
#endif
}
float RandomDevice::NextNumber(float fMin, float fMax)