mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-07 02:08:17 +02:00
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
38 lines
762 B
C#
38 lines
762 B
C#
namespace Robust.Shared.Random
|
|
{
|
|
public sealed class RobustRandom : IRobustRandom
|
|
{
|
|
private readonly System.Random _random = new();
|
|
|
|
public float NextFloat()
|
|
{
|
|
return _random.NextFloat();
|
|
}
|
|
|
|
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);
|
|
}
|
|
}
|
|
}
|