Improved how .bf and .br look like. Improved .slot result calculation performance (because of .slottest). Some string changes

This commit is contained in:
Kwoth
2022-07-13 06:22:39 +02:00
parent f3ed14de5b
commit 2b8daa2177
11 changed files with 151 additions and 102 deletions

View File

@@ -25,6 +25,20 @@ public class NadekoRandom : Random
_rng.GetBytes(bytes);
return Math.Abs(BitConverter.ToInt32(bytes, 0)) % maxValue;
}
public byte Next(byte minValue, byte maxValue)
{
if (minValue > maxValue)
throw new ArgumentOutOfRangeException(nameof(maxValue));
if (minValue == maxValue)
return minValue;
var bytes = new byte[1];
_rng.GetBytes(bytes);
return (byte)((bytes[0] % (maxValue - minValue)) + minValue);
}
public override int Next(int minValue, int maxValue)
{