namespace UnityHelpers.Core.Random
{
using System;
using System.Collections.Generic;
using DataStructure.Adapters;
public interface IRandom
{
RandomState InternalState { get; }
///
///
/// A number within the range [0, int.MaxValue).
int Next();
///
///
/// A number within the range [0, max).
int Next(int max);
///
///
/// A number within the range [min, max).
int Next(int min, int max);
///
///
/// A number within the range [0, uint.MaxValue].
uint NextUint();
///
///
/// A number within the range [0, max).
uint NextUint(uint max);
///
///
/// A number within the range [min, max).
uint NextUint(uint min, uint max);
///
///
/// A number within the range [0, short.MaxValue).
short NextShort();
///
///
/// A number within the range [0, max).
short NextShort(short max);
///
///
/// A number within the range [min, max).
short NextShort(short min, short max);
///
///
/// A number within the range [0, byte.MaxValue).
byte NextByte();
///
///
/// A number within the range [0, max).
byte NextByte(byte max);
///
///
/// A number within the range [min, max).
byte NextByte(byte min, byte max);
///
///
/// A number within the range [0, long.MaxValue).
long NextLong();
///
///
/// A number within the range [0, max).
long NextLong(long max);
///
///
/// A number within the range [min, max).
long NextLong(long min, long max);
///
///
/// A number within the range [0, ulong.MaxValue).
ulong NextUlong();
///
///
/// A number within the range [0, max).
ulong NextUlong(ulong max);
///
///
/// A number within the range [min, max).
ulong NextUlong(ulong min, ulong max);
///
///
/// 50% chance of true or false.
bool NextBool();
void NextBytes(byte[] buffer);
///
///
/// A number within the range [0, 1).
float NextFloat();
///
///
/// A number within the range [0, max).
float NextFloat(float max);
///
///
/// A number within the range min, max).
float NextFloat(float min, float max);
///
///
/// A number within the range [0, 1).
double NextDouble();
///
///
/// A number within the range [0, max).
double NextDouble(double max);
///
///
/// A number within the range min, max).
double NextDouble(double min, double max);
double NextGaussian(double mean = 0, double stdDev = 1);
Guid NextGuid();
KGuid NextKGuid();
T NextOf(IEnumerable enumerable);
T NextOf(IReadOnlyCollection collection);
T NextOf(IReadOnlyList list);
T NextEnum()
where T : struct, Enum;
float[,] NextNoiseMap(
int width,
int height,
PerlinNoise noise = null,
float scale = 2.5f,
int octaves = 8
);
IRandom Copy();
}
}