[*] Formatting regressions (+ 1x double-based RNG regression)

This commit is contained in:
Reece Wilson 2023-12-01 03:17:56 +00:00
parent cab8627ffd
commit 0c1c6d7c24
3 changed files with 5 additions and 6 deletions

View File

@ -282,7 +282,7 @@ namespace Aurora::RNG
double RandomDevice::NextDecimal()
{
return this->UniformFloatInRange(0.0, 1.0);
return this->UniformFloatInRange(DBL_EPSILON, 1.0);
}
AuUInt32 RandomDevice::NextIndex(AuUInt32 uCount /* = max + 1*/)
@ -299,8 +299,8 @@ namespace Aurora::RNG
double RandomDevice::NextNumber(double dMin, double dMax)
{
auto dRange = dMin - dMin;
return this->UniformFloatInRange(0.0, dRange) + dMin;
auto dRange = dMax - dMin;
return this->UniformFloatInRange(DBL_EPSILON, dRange + DBL_EPSILON) + dMin - DBL_EPSILON;
}
AuMemoryViewRead RandomDevice::ToSeed()

View File

@ -45,7 +45,7 @@ namespace Aurora::Threading::Primitives
}
bool SemaphoreConditionVariableImpl::WaitForSignalAbsNS(const AuSPtr<IWaitable> &pWaitable,
AuUInt64 uRelativeNanoseconds)
AuUInt64 uNanoseconds)
{
AuAtomicAdd(&this->uWaiters_, 1u);
@ -54,7 +54,7 @@ namespace Aurora::Threading::Primitives
pWaitable->Unlock();
}
auto bSuccess = this->s_.LockAbsNS(uRelativeNanoseconds);
auto bSuccess = this->s_.LockAbsNS(uNanoseconds);
if (!bSuccess)
{
auto uWaiters = this->uWaiters_;

View File

@ -934,7 +934,6 @@ namespace Aurora::Threading::Primitives
return &this->write_;
}
template<bool bIsWriteRecursionAllowed>
bool RWLockImpl<bIsWriteRecursionAllowed>::CheckSelfThreadIsWriter()
{