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...
|
|
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...
|
|
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...
|
|
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...
|
|
|
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/3]
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/3]
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/3]
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/3]
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/3]
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/3]
Int32 Photon.Deterministic.RNGSession.NextInclusive |
( |
Int32 |
minInclusive, |
|
|
Int32 |
maxInclusive |
|
) |
| |
|
inline |
Returns a random int within [minInclusive , maxInclusive ].
- Returns
- A random int within [minInclusive , maxInclusive ]
◆ ToString()
override string Photon.Deterministic.RNGSession.ToString |
( |
| ) |
|
|
inline |
Returns a string representation of the RNGSession.
◆ Serialize()
◆ GetHashCode()
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
Returns a copy of this RNGSession, can be used to check what next random values will be without affecting the state.