Photon Quantum 2.1.1

Public Member Functions | Properties | List of all members
Photon.Deterministic.RNGSession Struct Reference

PCG32 random generator, 16 bytes in size. http://www.pcg-random.org More...

Public Member Functions

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...
 

Properties

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...
 

Detailed Description

PCG32 random generator, 16 bytes in size. http://www.pcg-random.org

Member Function Documentation

◆ 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 ]

Property Documentation

◆ Peek

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.