Pack opening
This commit is contained in:
10
SVSim.EmulatedEntrypoint/Services/SystemRandom.cs
Normal file
10
SVSim.EmulatedEntrypoint/Services/SystemRandom.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace SVSim.EmulatedEntrypoint.Services;
|
||||
|
||||
public class SystemRandom : IRandom
|
||||
{
|
||||
private readonly Random _rng;
|
||||
public SystemRandom() { _rng = new Random(); }
|
||||
public SystemRandom(int seed) { _rng = new Random(seed); }
|
||||
public double NextDouble() => _rng.NextDouble();
|
||||
public int Next(int maxExclusive) => _rng.Next(maxExclusive);
|
||||
}
|
||||
Reference in New Issue
Block a user