Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cRandomFloatDef Class Reference

#include <cRandomFloat.h>

Inheritance diagram for GrayLib::cRandomFloatDef:
GrayLib::cRandomFloat Gray::cRandomBase Gray::IRandomNoise

Public Member Functions

 cRandomFloatDef (cRandomDef &def) noexcept
 
virtual void InitSeed (const void *pData, size_t iSize) override
 
virtual UINT GetRandUX (UINT nScale) override
 
- Public Member Functions inherited from GrayLib::cRandomFloat
virtual double get_RandDouble ()
 the default random number generator. More...
 
virtual float get_RandFloat ()
 
double GetRandDX (double nScale)
 
float GetRandFX (float nScale)
 
float GetRandFRange (float fRangeLo, float fRangeHi)
 
 UNITTEST_FRIEND (cRandomFloat)
 
- Public Member Functions inherited from Gray::cRandomBase
 cRandomBase () noexcept
 
virtual ~cRandomBase ()
 
void InitSeed (IRandomNoise *pSrc, size_t iSize)
 the default random number generator. NOT Thread Safe! More...
 
void InitSeedDefault (size_t iSize=sizeof(int))
 
void InitSeedUns (UINT iSeed)
 
virtual HRESULT GetNoise (void *pData, size_t iSize) override
 fill array with random. return # filled. More...
 
virtual UINT get_RandUns ()
 
bool GetRandBool ()
 
int GetRandIRange (int iRangeLo, int iRangeHi)
 

Additional Inherited Members

- Public Types inherited from Gray::cRandomBase
typedef UINT SEED_t
 default seed size might be 32 or 64 bit depending on k_RAND_MAX. More...
 

Detailed Description

Default implementation for floating point random numbers. based on cRandomDef. g_RandFloat is based on g_Rand

Constructor & Destructor Documentation

◆ cRandomFloatDef()

GrayLib::cRandomFloatDef::cRandomFloatDef ( cRandomDef def)
inlinenoexcept

Member Function Documentation

◆ GetRandUX()

UINT GrayLib::cRandomFloatDef::GetRandUX ( UINT  nScale)
overridevirtual

Get random number in scale. 0 to scale. unsigned integer is NON inclusive range. from 0 to nScale-1

get random integer number in 0 to < nScale range NON inclusive default implementation.

Note
derived implementation MUST override get_RandUns() or GetRandUX()

Reimplemented from Gray::cRandomBase.

◆ InitSeed()

void GrayLib::cRandomFloatDef::InitSeed ( const void *  pData,
size_t  iSize 
)
overridevirtual

Implements Gray::cRandomBase.


The documentation for this class was generated from the following files: