[*] Formatting regressions (+ 1x double-based RNG regression)
This commit is contained in:
parent
cab8627ffd
commit
0c1c6d7c24
@ -282,7 +282,7 @@ namespace Aurora::RNG
|
|||||||
|
|
||||||
double RandomDevice::NextDecimal()
|
double RandomDevice::NextDecimal()
|
||||||
{
|
{
|
||||||
return this->UniformFloatInRange(0.0, 1.0);
|
return this->UniformFloatInRange(DBL_EPSILON, 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
AuUInt32 RandomDevice::NextIndex(AuUInt32 uCount /* = max + 1*/)
|
AuUInt32 RandomDevice::NextIndex(AuUInt32 uCount /* = max + 1*/)
|
||||||
@ -299,8 +299,8 @@ namespace Aurora::RNG
|
|||||||
|
|
||||||
double RandomDevice::NextNumber(double dMin, double dMax)
|
double RandomDevice::NextNumber(double dMin, double dMax)
|
||||||
{
|
{
|
||||||
auto dRange = dMin - dMin;
|
auto dRange = dMax - dMin;
|
||||||
return this->UniformFloatInRange(0.0, dRange) + dMin;
|
return this->UniformFloatInRange(DBL_EPSILON, dRange + DBL_EPSILON) + dMin - DBL_EPSILON;
|
||||||
}
|
}
|
||||||
|
|
||||||
AuMemoryViewRead RandomDevice::ToSeed()
|
AuMemoryViewRead RandomDevice::ToSeed()
|
||||||
|
@ -45,7 +45,7 @@ namespace Aurora::Threading::Primitives
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool SemaphoreConditionVariableImpl::WaitForSignalAbsNS(const AuSPtr<IWaitable> &pWaitable,
|
bool SemaphoreConditionVariableImpl::WaitForSignalAbsNS(const AuSPtr<IWaitable> &pWaitable,
|
||||||
AuUInt64 uRelativeNanoseconds)
|
AuUInt64 uNanoseconds)
|
||||||
{
|
{
|
||||||
AuAtomicAdd(&this->uWaiters_, 1u);
|
AuAtomicAdd(&this->uWaiters_, 1u);
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ namespace Aurora::Threading::Primitives
|
|||||||
pWaitable->Unlock();
|
pWaitable->Unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
auto bSuccess = this->s_.LockAbsNS(uRelativeNanoseconds);
|
auto bSuccess = this->s_.LockAbsNS(uNanoseconds);
|
||||||
if (!bSuccess)
|
if (!bSuccess)
|
||||||
{
|
{
|
||||||
auto uWaiters = this->uWaiters_;
|
auto uWaiters = this->uWaiters_;
|
||||||
|
@ -934,7 +934,6 @@ namespace Aurora::Threading::Primitives
|
|||||||
return &this->write_;
|
return &this->write_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<bool bIsWriteRecursionAllowed>
|
template<bool bIsWriteRecursionAllowed>
|
||||||
bool RWLockImpl<bIsWriteRecursionAllowed>::CheckSelfThreadIsWriter()
|
bool RWLockImpl<bIsWriteRecursionAllowed>::CheckSelfThreadIsWriter()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user