NetworkRNG Struct Reference

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

Inherits INetworkStruct.

## Public Member Functions | |

NetworkRNG (Int32 seed) | |

double | Next () |

Returns a random Double within [0, 1] (range is inclusive). More... | |

double | NextExclusive () |

Returns a random Double within [0, 1) (range is exclusive). More... | |

int | NextInt32 () |

[int.MinValue, int.MaxValue] More... | |

float | NextSingle () |

Returns a random Single within [0, 1] (range is inclusive). More... | |

float | NextSingleExclusive () |

[0, 1) Returns a random Single within [0, 1) (range is exclusive). More... | |

uint | NextUInt32 () |

[0, uint.MaxValue] More... | |

Int32 | RangeExclusive (Int32 minInclusive, Int32 maxExclusive) |

Returns a random Int32 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. More... | |

UInt32 | RangeExclusive (UInt32 minInclusive, UInt32 maxExclusive) |

Returns a random UInt32 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. More... | |

Double | RangeInclusive (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. More... | |

Int32 | RangeInclusive (Int32 minInclusive, Int32 maxInclusive) |

Returns a random Int32 within [minInclusive, maxInclusive] (range is inclusive). If minInclusive is greater than maxInclusive, then the numbers are automatically swapped. More... | |

Single | RangeInclusive (Single minInclusive, Single maxInclusive) |

Returns a random Single within [minInclusive, maxInclusive] (range is inclusive). If minInclusive is greater than maxInclusive, then the numbers are automatically swapped. More... | |

UInt32 | RangeInclusive (UInt32 minInclusive, UInt32 maxInclusive) |

Returns a random UInt32 within [minInclusive, maxInclusive] (range is inclusive). If minInclusive is greater than maxInclusive, then the numbers are automatically swapped. More... | |

override string | ToString () |

## Static Public Attributes | |

const UInt32 | MAX = UInt32.MaxValue |

const int | SIZE = 16 |

## Properties | |

NetworkRNG | Peek` [get]` |

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

double Next | ( | ) |

Returns a random Double within [0, 1] (range is inclusive).

- Returns

double NextExclusive | ( | ) |

Returns a random Double within [0, 1) (range is exclusive).

- Returns

int NextInt32 | ( | ) |

[int.MinValue, int.MaxValue]

- Returns

float NextSingle | ( | ) |

Returns a random Single within [0, 1] (range is inclusive).

- Returns

float NextSingleExclusive | ( | ) |

[0, 1) Returns a random Single within [0, 1) (range is exclusive).

- Returns

uint NextUInt32 | ( | ) |

[0, uint.MaxValue]

- Returns

Int32 RangeExclusive | ( | Int32 | minInclusive, |

Int32 | maxExclusive |
||

) |

Returns a random Int32 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.

UInt32 RangeExclusive | ( | UInt32 | minInclusive, |

UInt32 | maxExclusive |
||

) |

Returns a random UInt32 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 RangeInclusive | ( | 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.

Int32 RangeInclusive | ( | Int32 | minInclusive, |

Int32 | maxInclusive |
||

) |

Returns a random Int32 within [minInclusive, maxInclusive] (range is inclusive). If minInclusive is greater than maxInclusive, then the numbers are automatically swapped.

Single RangeInclusive | ( | Single | minInclusive, |

Single | maxInclusive |
||

) |

Returns a random Single within [minInclusive, maxInclusive] (range is inclusive). If minInclusive is greater than maxInclusive, then the numbers are automatically swapped.

UInt32 RangeInclusive | ( | UInt32 | minInclusive, |

UInt32 | maxInclusive |
||

) |

Returns a random UInt32 within [minInclusive, maxInclusive] (range is inclusive). If minInclusive is greater than maxInclusive, then the numbers are automatically swapped.