PCG32 random generator, 16 bytes in size. http://www.pcg-random.org
More...
|
| | RNGSession (Int32 seed) |
| | Create a new RNGSession with the given seed. More...
|
| |
| readonly override int | GetHashCode () |
| | Overrides the default hash function. More...
|
| |
| FP | Next () |
| | Returns a random FP within [0.0, 1.0). More...
|
| |
| FP | Next (FP minInclusive, FP maxExclusive) |
| | Returns a random FP within [minInclusive , maxExclusive ). More...
|
| |
| Int32 | Next (Int32 minInclusive, Int32 maxExclusive) |
| | Returns a random int within [minInclusive , maxExclusive ]. More...
|
| |
| Int64 | Next (Int64 minInclusive, Int64 maxExclusive) |
| | Returns a random int within [minInclusive , maxExclusive ]. More...
|
| |
| UInt32 | Next (UInt32 maxExclusive) |
| | Returns a random uint within [0, maxExclusive ). More...
|
| |
| UInt64 | Next (UInt64 maxExclusive) |
| | Returns a random ulong within [0, maxExclusive ). More...
|
| |
| FP | NextInclusive () |
| | Returns a random FP within [0.0, 1.0]. More...
|
| |
| FP | NextInclusive (FP minInclusive, FP maxInclusive) |
| | Returns a random FP within [minInclusive , maxInclusive ]. More...
|
| |
| Int32 | NextInclusive (Int32 minInclusive, Int32 maxInclusive) |
| | Returns a random int within [minInclusive , maxInclusive ]. More...
|
| |
| Int64 | NextInclusive (Int64 minInclusive, Int64 maxInclusive) |
| | Returns a random int within [minInclusive , maxInclusive ]. More...
|
| |
| UInt64 | NextUInt64 () |
| | Generates a uniformly distributed random ulong. More...
|
| |
| readonly override string | ToString () |
| | Returns a string representation of the RNGSession. More...
|
| |
|
| const UInt32 | MAX = UInt32.MaxValue |
| | The maximum possible value to generate. More...
|
| |
| const int | SIZE = 16 |
| | The size of the struct in-memory inside the Frame data-buffers or stack (when passed as value parameter). Not related to the snapshot payload this occupies, which is bit-packed and compressed. More...
|
| |
|
| readonly RNGSession | Peek [get] |
| | Returns a copy of this RNGSession, can be used to check what next random values will be without affecting the state. More...
|
| |
PCG32 random generator, 16 bytes in size. http://www.pcg-random.org
◆ RNGSession()
| Photon.Deterministic.RNGSession.RNGSession |
( |
Int32 |
seed | ) |
|
|
inline |
Create a new RNGSession with the given seed.
- Parameters
-
| seed | The random number generator seed. |
◆ Next() [1/6]
| FP Photon.Deterministic.RNGSession.Next |
( |
| ) |
|
Returns a random FP within [0.0, 1.0).
- Returns
- A random FP within [0.0, 1.0)
◆ NextInclusive() [1/4]
| FP Photon.Deterministic.RNGSession.NextInclusive |
( |
| ) |
|
Returns a random FP within [0.0, 1.0].
- Returns
- A random FP within [0.0, 1.0]
◆ Next() [2/6]
| FP Photon.Deterministic.RNGSession.Next |
( |
FP |
minInclusive, |
|
|
FP |
maxExclusive |
|
) |
| |
|
inline |
Returns a random FP within [minInclusive , maxExclusive ).
- Returns
- A random FP within [minInclusive , maxExclusive )
◆ NextInclusive() [2/4]
| FP Photon.Deterministic.RNGSession.NextInclusive |
( |
FP |
minInclusive, |
|
|
FP |
maxInclusive |
|
) |
| |
|
inline |
Returns a random FP within [minInclusive , maxInclusive ].
- Returns
- A random FP within [minInclusive , maxInclusive ]
◆ Next() [3/6]
| Int32 Photon.Deterministic.RNGSession.Next |
( |
Int32 |
minInclusive, |
|
|
Int32 |
maxExclusive |
|
) |
| |
|
inline |
Returns a random int within [minInclusive , maxExclusive ].
- Returns
- A random int within [minInclusive , maxExclusive ]
◆ NextInclusive() [3/4]
| Int32 Photon.Deterministic.RNGSession.NextInclusive |
( |
Int32 |
minInclusive, |
|
|
Int32 |
maxInclusive |
|
) |
| |
|
inline |
Returns a random int within [minInclusive , maxInclusive ].
- Returns
- A random int within [minInclusive , maxInclusive ]
◆ Next() [4/6]
| Int64 Photon.Deterministic.RNGSession.Next |
( |
Int64 |
minInclusive, |
|
|
Int64 |
maxExclusive |
|
) |
| |
|
inline |
Returns a random int within [minInclusive , maxExclusive ].
- Returns
- A random int within [minInclusive , maxExclusive ]
◆ NextInclusive() [4/4]
| Int64 Photon.Deterministic.RNGSession.NextInclusive |
( |
Int64 |
minInclusive, |
|
|
Int64 |
maxInclusive |
|
) |
| |
|
inline |
Returns a random int within [minInclusive , maxInclusive ].
- Returns
- A random int within [minInclusive , maxInclusive ]
◆ Next() [5/6]
| UInt32 Photon.Deterministic.RNGSession.Next |
( |
UInt32 |
maxExclusive | ) |
|
|
inline |
Returns a random uint within [0, maxExclusive ).
- Returns
- A random int within [0, maxExclusive )
◆ Next() [6/6]
| UInt64 Photon.Deterministic.RNGSession.Next |
( |
UInt64 |
maxExclusive | ) |
|
|
inline |
Returns a random ulong within [0, maxExclusive ).
- Returns
- A random ulong within [0, maxExclusive )
◆ NextUInt64()
| UInt64 Photon.Deterministic.RNGSession.NextUInt64 |
( |
| ) |
|
Generates a uniformly distributed random ulong.
◆ ToString()
| readonly override string Photon.Deterministic.RNGSession.ToString |
( |
| ) |
|
|
inline |
Returns a string representation of the RNGSession.
◆ Serialize()
◆ GetHashCode()
| readonly override int Photon.Deterministic.RNGSession.GetHashCode |
( |
| ) |
|
|
inline |
Overrides the default hash function.
- Returns
- A hash code for the current object.
◆ SIZE
| const int Photon.Deterministic.RNGSession.SIZE = 16 |
|
static |
The size of the struct in-memory inside the Frame data-buffers or stack (when passed as value parameter). Not related to the snapshot payload this occupies, which is bit-packed and compressed.
◆ MAX
| const UInt32 Photon.Deterministic.RNGSession.MAX = UInt32.MaxValue |
|
static |
The maximum possible value to generate.
◆ Peek
| readonly RNGSession Photon.Deterministic.RNGSession.Peek |
|
get |
Returns a copy of this RNGSession, can be used to check what next random values will be without affecting the state.