mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-03 02:27:08 +02:00
35 lines
701 B
C#
35 lines
701 B
C#
using Robust.Shared.Interfaces.Random;
|
|
|
|
namespace Robust.Shared.Random
|
|
{
|
|
public class RobustRandom : IRobustRandom
|
|
{
|
|
private readonly System.Random _random = new();
|
|
|
|
public int Next()
|
|
{
|
|
return _random.Next();
|
|
}
|
|
|
|
public int Next(int minValue, int maxValue)
|
|
{
|
|
return _random.Next(minValue, maxValue);
|
|
}
|
|
|
|
public int Next(int maxValue)
|
|
{
|
|
return _random.Next(maxValue);
|
|
}
|
|
|
|
public double NextDouble()
|
|
{
|
|
return _random.NextDouble();
|
|
}
|
|
|
|
public void NextBytes(byte[] buffer)
|
|
{
|
|
_random.NextBytes(buffer);
|
|
}
|
|
}
|
|
}
|