SeededRandomProvider
Ecng.Common
A source that starts from a stated point, so the same series can be had again.
Implementiert: IRandomProvider
Konstruktoren
SeededRandomProvider
public SeededRandomProvider(int seed)
seededRandomProvider = SeededRandomProvider(seed)
A source that starts from a stated point, so the same series can be had again.
- seed
- Where the series starts.
Methoden
Next
public virtual int Next(int min, int max)
result = seededRandomProvider.Next(min, max)
Returns a value in the range, both ends included.
- min
- Smallest value that may be returned.
- max
- Largest value that may be returned.
Rückgabe: A value between and .
NextBytes
public virtual void NextBytes(byte[] buffer)
seededRandomProvider.NextBytes(buffer)
Fills the buffer with random bytes.
- buffer
- Buffer to fill.
NextDouble
public virtual double NextDouble()
result = seededRandomProvider.NextDouble()
Returns a value in [0, 1).
Rückgabe: A value from zero up to but not including one.
NextLong
public virtual long NextLong(long min, long max)
result = seededRandomProvider.NextLong(min, max)
Returns a value in the range, both ends included.
- min
- Smallest value that may be returned.
- max
- Largest value that may be returned.
Rückgabe: A value between and .