PkmnLibSharp/PkmnLibSharp/Utilities/Random.cs

59 lines
1.4 KiB
C#

namespace PkmnLibSharp.Utilities
{
public class Random : PointerWrapper
{
public Random() : base(Arbutils.Generated.Random.Construct())
{
}
public Random(ulong seed) : base(Arbutils.Generated.Random.ConstructWithSeed(seed))
{
}
public float GetFloat()
{
return Arbutils.Generated.Random.GetFloat(Ptr);
}
public double GetDouble()
{
return Arbutils.Generated.Random.GetDouble(Ptr);
}
public int Get()
{
return Arbutils.Generated.Random.Get(Ptr);
}
public int Get(int max)
{
return Arbutils.Generated.Random.GetWithMax(Ptr, max);
}
public int Get(int min, int max)
{
return Arbutils.Generated.Random.GetInLimits(Ptr, min, max);
}
public uint GetUnsigned()
{
return Arbutils.Generated.Random.GetUnsigned(Ptr);
}
public uint GetUnsigned(uint max)
{
return Arbutils.Generated.Random.GetUnsignedWithMax(Ptr, max);
}
public uint GetUnsigned(uint min, uint max)
{
return Arbutils.Generated.Random.GetUnsignedInLimits(Ptr, min, max);
}
protected override void DeletePtr()
{
Arbutils.Generated.Random.Destruct(Ptr);
}
}
}