Photon Fusion
2.1.1
PCG32 random generator, 16 bytes in size. http://www.pcg-random.org. More...
Inherits INetworkStruct.
Public Member Functions | |
| readonly override int | GetHashCode () |
| Overrides the default hash function. | |
| NetworkRNG (int seed) | |
| Create a new RNGSession with the given seed. | |
| float | Next () |
| int | Next (int minInclusive, int maxExclusive) |
| Returns a random int within [minInclusive, maxExclusive) (range is exclusive). If minInclusive and maxExclusive are equal, then the "exclusive rule" is ignored and minInclusive will be returned. If minInclusive is greater than maxExclusive, then the numbers are automatically swapped. | |
| long | Next (long minInclusive, long maxExclusive) |
| Returns a random long within [minInclusive, maxExclusive) (range is exclusive). If minInclusive and maxExclusive are equal, then the "exclusive rule" is ignored and minInclusive will be returned. If minInclusive is greater than maxExclusive, then the numbers are automatically swapped. | |
| uint | Next (uint maxExclusive) |
| Returns a random uint within [0, maxExclusive ). | |
| uint | Next (uint minInclusive, uint maxExclusive) |
| Returns a random uint within [minInclusive, maxExclusive) (range is exclusive). If minInclusive and maxExclusive are equal, then the "exclusive rule" is ignored and minInclusive will be returned. If minInclusive is greater than maxExclusive, then the numbers are automatically swapped. | |
| ulong | Next (ulong maxExclusive) |
| Returns a random ulong within [0, maxExclusive ). | |
| ulong | Next (ulong minInclusive, ulong maxExclusive) |
| Returns a random ulong within [minInclusive, maxExclusive) (range is exclusive). If minInclusive and maxExclusive are equal, then the "exclusive rule" is ignored and minInclusive will be returned. If minInclusive is greater than maxExclusive, then the numbers are automatically swapped. | |
| double | NextDouble () |
| Generates a random double value within the inclusive range [0, 1]. | |
| double | NextDoubleExclusive () |
| Generates a random double value within the exclusive range [0, 1). | |
| double | NextInclusive (double minInclusive, double maxInclusive) |
| Returns a random double within [minInclusive, maxInclusive] (range is inclusive). If minInclusive is greater than maxInclusive, then the numbers are automatically swapped. | |
| float | NextInclusive (float minInclusive, float maxInclusive) |
| Returns a random float within [minInclusive, maxInclusive] (range is inclusive). If minInclusive is greater than maxInclusive, then the numbers are automatically swapped. | |
| int | NextInclusive (int minInclusive, int maxInclusive) |
| Returns a random int within [minInclusive, maxInclusive] (range is inclusive). If minInclusive is greater than maxInclusive, then the numbers are automatically swapped. | |
| long | NextInclusive (long minInclusive, long maxInclusive) |
| Returns a random long within [minInclusive, maxInclusive] (range is inclusive). If minInclusive is greater than maxInclusive, then the numbers are automatically swapped. | |
| uint | NextInclusive (uint maxInclusive) |
| Returns a random uint within [0, maxInclusive ]. | |
| uint | NextInclusive (uint minInclusive, uint maxInclusive) |
| Returns a random uint within [minInclusive, maxInclusive] (range is inclusive). If minInclusive is greater than maxInclusive, then the numbers are automatically swapped. | |
| ulong | NextInclusive (ulong maxInclusive) |
| Returns a random uint within [0, maxInclusive ]. | |
| ulong | NextInclusive (ulong minInclusive, ulong maxInclusive) |
| Returns a random ulong within [minInclusive, maxInclusive] (range is inclusive). If minInclusive is greater than maxInclusive, then the numbers are automatically swapped. | |
| int | NextInt32 () |
Generates a uniformly distributed random int. | |
| long | NextInt64 () |
Generates a uniformly distributed random int64. | |
| float | NextSingle () |
| Generates a random float value within the inclusive range [0, 1]. | |
| float | NextSingleExclusive () |
| Generates a random float value within the exclusive range [0, 1). | |
| uint | NextUInt32 () |
| Gets the. | |
| ulong | NextUInt64 () |
Generates a uniformly distributed random ulong. | |
| int | RangeExclusive (int minExclusive, int maxExclusive) |
| uint | RangeExclusive (uint minExclusive, uint maxExclusive) |
| double | RangeInclusive (double minInclusive, double maxInclusive) |
| float | RangeInclusive (float minInclusive, float maxInclusive) |
| int | RangeInclusive (int minInclusive, int maxInclusive) |
| uint | RangeInclusive (uint minInclusive, uint maxInclusive) |
Properties | |
| readonly NetworkRNG | Peek [get] |
| Returns a copy of this RNGSession, can be used to check what next random values will be without affecting the state. | |
PCG32 random generator, 16 bytes in size. http://www.pcg-random.org.
| NetworkRNG | ( | int | seed | ) |
Create a new RNGSession with the given seed.
| seed | The random number generator seed. |
| readonly override int GetHashCode | ( | ) |
Overrides the default hash function.
| uint Next | ( | uint | maxExclusive | ) |
Returns a random uint within [0, maxExclusive ).
| ulong Next | ( | ulong | maxExclusive | ) |
Returns a random ulong within [0, maxExclusive ).
| double NextDouble | ( | ) |
Generates a random double value within the inclusive range [0, 1].
| double NextDoubleExclusive | ( | ) |
Generates a random double value within the exclusive range [0, 1).
| float NextSingle | ( | ) |
Generates a random float value within the inclusive range [0, 1].
| float NextSingleExclusive | ( | ) |
Generates a random float value within the exclusive range [0, 1).
| uint NextUInt32 | ( | ) |
Gets the.