Class SeededRandom
Random implementation that uses a fixed seed for deterministic output.
public sealed class SeededRandom : IRandom
- Inheritance
-
SeededRandom
- Implements
- Inherited Members
Constructors
SeededRandom(int)
Initializes a new seeded random instance.
public SeededRandom(int seed)
Parameters
seedintThe deterministic seed value.
Methods
Next(int, int)
Returns a random integer within the specified range.
public int Next(int minValue, int maxValue)
Parameters
minValueintInclusive lower bound of the random number.
maxValueintExclusive upper bound of the random number.
Returns
- int
A random integer in the specified range.
NextDouble()
Returns a random floating-point number in the range [0.0, 1.0).
public double NextDouble()
Returns
- double
A random floating-point number.