AuroraRuntime/Source/RNG/AuRNGStaticUtilities.cpp
Jamie Reece Wilson c16a0b1600 [+] IRandomDevice::NextArrayI32Range
[+] IRandomDevice::NextArrayU32Range
[+] IRandomDevice::NextArrayDoubleRange
[+] IRandomDevice::NextArrayI32
[+] IRandomDevice::NextArrayU32
[+] IRandomDevice::NextArrayDouble
[+] IRandomDevice::NextArrayDecimals
[+] IRandomDevice::NextArrayUUIDs
[*] IRandomDevice minor refactoring for consistency
[*] Improve decimals once again (perf/deterministic)
2024-01-01 14:49:35 +00:00

115 lines
2.8 KiB
C++

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: AuRNGStaticUtilities.cpp
Date: 2022-9-17
File: RNG.cpp
Date: 2021-6-11
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include "AuRNG.hpp"
#include "AuRNGStaticUtilities.hpp"
namespace Aurora::RNG
{
AUKN_SYM AuString ReadString(AuUInt32 dwLength, ERngStringCharacters type)
{
return gFastDevice->NextString(dwLength, type);
}
AUKN_SYM void RngString(char *pString, AuUInt32 dwLength, ERngStringCharacters type)
{
gFastDevice->NextString(pString, dwLength, type);
}
AUKN_SYM AuUInt8 RngByte()
{
return gFastDevice->NextByte();
}
AUKN_SYM bool RngBoolean()
{
return gFastDevice->NextBoolean();
}
AUKN_SYM AuUInt32 RngU32()
{
return gFastDevice->NextU32();
}
AUKN_SYM AuUInt32 RngU32Range(AuUInt32 uMin, AuUInt32 uMax)
{
return gFastDevice->NextU32Range(uMin, uMax);
}
AUKN_SYM AuUInt64 RngU64()
{
return gFastDevice->NextU64();
}
AUKN_SYM AuInt32 RngI32Range(AuInt32 uMin, AuInt32 uMax)
{
return gFastDevice->NextI32Range(uMin, uMax);
}
AUKN_SYM double RngDecimal()
{
return gFastDevice->NextDecimal();
}
AUKN_SYM double RngNumber(double min, double max)
{
return gFastDevice->NextNumber(min, max);
}
AUKN_SYM AuUInt32 RngIndex(AuUInt32 uCount /* = max + 1*/)
{
return gFastDevice->NextIndex(uCount);
}
AUKN_SYM uuids::uuid RngUUID()
{
return gFastDevice->NextUUID();
}
AUKN_SYM AuList<AuInt32> RngArrayI32Range(AuUInt32 uCount, AuInt32 iMin, AuInt32 iMax)
{
return gFastDevice->NextArrayI32Range(uCount, iMin, iMax);
}
AUKN_SYM AuList<AuUInt32> RngArrayU32Range(AuUInt32 uCount, AuUInt32 uMin, AuUInt32 uMax)
{
return gFastDevice->NextArrayU32Range(uCount, uMin, uMax);
}
AUKN_SYM AuList<double> RngArrayDoubleRange(AuUInt32 uCount, double dMin, double dMax)
{
return gFastDevice->NextArrayDoubleRange(uCount, dMin, dMax);
}
AUKN_SYM AuList<AuInt32> RngArrayI32(AuUInt32 uCount)
{
return gFastDevice->NextArrayI32(uCount);
}
AUKN_SYM AuList<AuUInt32> RngArrayU32(AuUInt32 uCount)
{
return gFastDevice->NextArrayU32(uCount);
}
AUKN_SYM AuList<double> RngArrayDouble(AuUInt32 uCount)
{
return gFastDevice->NextArrayDouble(uCount);
}
AUKN_SYM AuList<double> RngArrayDecimals(AuUInt32 uCount)
{
return gFastDevice->NextArrayDecimals(uCount);
}
AUKN_SYM AuList<uuids::uuid> RngArrayUUIDs(AuUInt32 uCount)
{
return gFastDevice->NextArrayUUIDs(uCount);
}
}