TBLRandom
Simple pseudo random number generator based on XORSHIFT+
, which has 64-bit seed, 128 bits of state, and full period 2^128 - 1
.
Based on a paper by Sebastiano Vigna: XORSHIFT+.
Definition
Unit: Blend2D
Constructors
Name | Description |
---|---|
Create |
Operators
Name | Description |
---|---|
Equal | |
NotEqual |
Methods
Name | Description |
---|---|
Create | |
Equals | Tests whether the random number generator is equivalent to Ather . |
NextDouble | Returns the next pseudo-random Double precision floating point in [0..1) range and advances PRNG state. |
NextUInt32 | Returns the next pseudo-random UInt32 value and advances PRNG state. |
NextUInt64 | Returns the next pseudo-random UInt64 value and advances PRNG state. |
Reset | Resets the random number generator to the given ASeed . |
Constructor Descriptions
Create
constructor Create(const ASeed: UInt64); overload
Parameters
ASeed
: UInt64
Operator Descriptions
Equal(TBLRandom, TBLRandom)
class operator Equal(const ALeft, ARight: TBLRandom): Boolean; inline; static
Parameters
ALeft
: TBLRandom
ARight
: TBLRandom
Returns
Boolean
NotEqual(TBLRandom, TBLRandom)
class operator NotEqual(const ALeft, ARight: TBLRandom): Boolean; inline; static
Parameters
ALeft
: TBLRandom
ARight
: TBLRandom
Returns
Boolean
Method Descriptions
Create
class function Create: TBLRandom; overload; inline; static
Returns
Equals(TBLRandom)
Tests whether the random number generator is equivalent to Ather
.
function Equals(const AOther: TBLRandom): Boolean; inline
Parameters
AOther
: TBLRandom
Returns
Boolean
Remarks
It would return True only when its internal state matches AOther
's internal state.
NextDouble
Returns the next pseudo-random Double
precision floating point in [0..1) range and advances PRNG state.
function NextDouble: Double; inline
Returns
Double
NextUInt32
Returns the next pseudo-random UInt32
value and advances PRNG state.
function NextUInt32: UInt32; inline
Returns
UInt32
NextUInt64
Returns the next pseudo-random UInt64
value and advances PRNG state.
function NextUInt64: UInt64; inline
Returns
UInt64
Reset(UInt64)
Resets the random number generator to the given ASeed
.
procedure Reset(const ASeed: UInt64 = 0)
Parameters
ASeed
: UInt64 = 0