143 lines
6.4 KiB
C#
143 lines
6.4 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace System
|
|
{
|
|
/// <summary>Represents a pseudo-random number generator, which is a device that produces a sequence of numbers that meet certain statistical requirements for randomness.</summary>
|
|
// Token: 0x0200012C RID: 300
|
|
[Token(Token = "0x200012C")]
|
|
[ComVisible(true)]
|
|
[Serializable]
|
|
public class Random
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Random" /> class, using a time-dependent default seed value.</summary>
|
|
// Token: 0x06000ACC RID: 2764 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6000ACC")]
|
|
[Address(RVA = "0x2A17520", Offset = "0x2A16320", VA = "0x182A17520")]
|
|
public Random()
|
|
{
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Random" /> class, using the specified seed value.</summary>
|
|
/// <param name="Seed">A number used to calculate a starting value for the pseudo-random number sequence. If a negative number is specified, the absolute value of the number is used.</param>
|
|
// Token: 0x06000ACD RID: 2765 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6000ACD")]
|
|
[Address(RVA = "0x2A17550", Offset = "0x2A16350", VA = "0x182A17550")]
|
|
public Random(int Seed)
|
|
{
|
|
}
|
|
|
|
/// <summary>Returns a random floating-point number between 0.0 and 1.0.</summary>
|
|
/// <returns>A double-precision floating point number that is greater than or equal to 0.0, and less than 1.0.</returns>
|
|
// Token: 0x06000ACE RID: 2766 RVA: 0x000097E0 File Offset: 0x000079E0
|
|
[Token(Token = "0x6000ACE")]
|
|
[Address(RVA = "0x2A17500", Offset = "0x2A16300", VA = "0x182A17500", Slot = "4")]
|
|
protected virtual double Sample()
|
|
{
|
|
return 0.0;
|
|
}
|
|
|
|
// Token: 0x06000ACF RID: 2767 RVA: 0x000097F8 File Offset: 0x000079F8
|
|
[Token(Token = "0x6000ACF")]
|
|
[Address(RVA = "0x2A17100", Offset = "0x2A15F00", VA = "0x182A17100")]
|
|
private int InternalSample()
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Returns a non-negative random integer.</summary>
|
|
/// <returns>A 32-bit signed integer that is greater than or equal to 0 and less than <see cref="F:System.Int32.MaxValue" />.</returns>
|
|
// Token: 0x06000AD0 RID: 2768 RVA: 0x00009810 File Offset: 0x00007A10
|
|
[Token(Token = "0x6000AD0")]
|
|
[Address(RVA = "0x2A17270", Offset = "0x2A16070", VA = "0x182A17270", Slot = "5")]
|
|
public virtual int Next()
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
// Token: 0x06000AD1 RID: 2769 RVA: 0x00009828 File Offset: 0x00007A28
|
|
[Token(Token = "0x6000AD1")]
|
|
[Address(RVA = "0x2A170A0", Offset = "0x2A15EA0", VA = "0x182A170A0")]
|
|
private double GetSampleForLargeRange()
|
|
{
|
|
return 0.0;
|
|
}
|
|
|
|
/// <summary>Returns a random integer that is within a specified range.</summary>
|
|
/// <param name="minValue">The inclusive lower bound of the random number returned.</param>
|
|
/// <param name="maxValue">The exclusive upper bound of the random number returned. <paramref name="maxValue" /> must be greater than or equal to <paramref name="minValue" />.</param>
|
|
/// <returns>A 32-bit signed integer greater than or equal to <paramref name="minValue" /> and less than <paramref name="maxValue" />; that is, the range of return values includes <paramref name="minValue" /> but not <paramref name="maxValue" />. If <paramref name="minValue" /> equals <paramref name="maxValue" />, <paramref name="minValue" /> is returned.</returns>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="minValue" /> is greater than <paramref name="maxValue" />.</exception>
|
|
// Token: 0x06000AD2 RID: 2770 RVA: 0x00009840 File Offset: 0x00007A40
|
|
[Token(Token = "0x6000AD2")]
|
|
[Address(RVA = "0x2A17280", Offset = "0x2A16080", VA = "0x182A17280", Slot = "6")]
|
|
public virtual int Next(int minValue, int maxValue)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Returns a non-negative random integer that is less than the specified maximum.</summary>
|
|
/// <param name="maxValue">The exclusive upper bound of the random number to be generated. <paramref name="maxValue" /> must be greater than or equal to 0.</param>
|
|
/// <returns>A 32-bit signed integer that is greater than or equal to 0, and less than <paramref name="maxValue" />; that is, the range of return values ordinarily includes 0 but not <paramref name="maxValue" />. However, if <paramref name="maxValue" /> equals 0, <paramref name="maxValue" /> is returned.</returns>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="maxValue" /> is less than 0.</exception>
|
|
// Token: 0x06000AD3 RID: 2771 RVA: 0x00009858 File Offset: 0x00007A58
|
|
[Token(Token = "0x6000AD3")]
|
|
[Address(RVA = "0x2A17410", Offset = "0x2A16210", VA = "0x182A17410", Slot = "7")]
|
|
public virtual int Next(int maxValue)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Returns a random floating-point number that is greater than or equal to 0.0, and less than 1.0.</summary>
|
|
/// <returns>A double-precision floating point number that is greater than or equal to 0.0, and less than 1.0.</returns>
|
|
// Token: 0x06000AD4 RID: 2772 RVA: 0x00009870 File Offset: 0x00007A70
|
|
[Token(Token = "0x6000AD4")]
|
|
[Address(RVA = "0x851660", Offset = "0x850460", VA = "0x180851660", Slot = "8")]
|
|
public virtual double NextDouble()
|
|
{
|
|
return 0.0;
|
|
}
|
|
|
|
/// <summary>Fills the elements of a specified array of bytes with random numbers.</summary>
|
|
/// <param name="buffer">An array of bytes to contain random numbers.</param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="buffer" /> is <see langword="null" />.</exception>
|
|
// Token: 0x06000AD5 RID: 2773 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6000AD5")]
|
|
[Address(RVA = "0x2A171B0", Offset = "0x2A15FB0", VA = "0x182A171B0", Slot = "9")]
|
|
public virtual void NextBytes(byte[] buffer)
|
|
{
|
|
}
|
|
|
|
// Token: 0x04000476 RID: 1142
|
|
[Token(Token = "0x4000476")]
|
|
private const int MBIG = 2147483647;
|
|
|
|
// Token: 0x04000477 RID: 1143
|
|
[Token(Token = "0x4000477")]
|
|
private const int MSEED = 161803398;
|
|
|
|
// Token: 0x04000478 RID: 1144
|
|
[Token(Token = "0x4000478")]
|
|
private const int MZ = 0;
|
|
|
|
// Token: 0x04000479 RID: 1145
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4000479")]
|
|
private int inext;
|
|
|
|
// Token: 0x0400047A RID: 1146
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x14")]
|
|
[Token(Token = "0x400047A")]
|
|
private int inextp;
|
|
|
|
// Token: 0x0400047B RID: 1147
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x400047B")]
|
|
private int[] SeedArray;
|
|
}
|
|
}
|