Files
27Aug2021-Cpp2IL-Dump/mscorlib/System/Random.cs
T
niko c12fbe3fc6 m
2026-04-12 16:51:38 +02:00

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: 0x02000133 RID: 307
[Token(Token = "0x2000133")]
[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: 0x06000AFE RID: 2814 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6000AFE")]
[Address(RVA = "0x2D7C010", Offset = "0x2D7B010", VA = "0x182D7C010")]
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: 0x06000AFF RID: 2815 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6000AFF")]
[Address(RVA = "0x2D7C040", Offset = "0x2D7B040", VA = "0x182D7C040")]
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: 0x06000B00 RID: 2816 RVA: 0x00009AB0 File Offset: 0x00007CB0
[Token(Token = "0x6000B00")]
[Address(RVA = "0x2D7BFF0", Offset = "0x2D7AFF0", VA = "0x182D7BFF0", Slot = "4")]
protected virtual double Sample()
{
return 0.0;
}
// Token: 0x06000B01 RID: 2817 RVA: 0x00009AC8 File Offset: 0x00007CC8
[Token(Token = "0x6000B01")]
[Address(RVA = "0x2D7BBF0", Offset = "0x2D7ABF0", VA = "0x182D7BBF0")]
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: 0x06000B02 RID: 2818 RVA: 0x00009AE0 File Offset: 0x00007CE0
[Token(Token = "0x6000B02")]
[Address(RVA = "0x2D7BD60", Offset = "0x2D7AD60", VA = "0x182D7BD60", Slot = "5")]
public virtual int Next()
{
return 0;
}
// Token: 0x06000B03 RID: 2819 RVA: 0x00009AF8 File Offset: 0x00007CF8
[Token(Token = "0x6000B03")]
[Address(RVA = "0x2D7BB90", Offset = "0x2D7AB90", VA = "0x182D7BB90")]
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: 0x06000B04 RID: 2820 RVA: 0x00009B10 File Offset: 0x00007D10
[Token(Token = "0x6000B04")]
[Address(RVA = "0x2D7BD70", Offset = "0x2D7AD70", VA = "0x182D7BD70", 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: 0x06000B05 RID: 2821 RVA: 0x00009B28 File Offset: 0x00007D28
[Token(Token = "0x6000B05")]
[Address(RVA = "0x2D7BF00", Offset = "0x2D7AF00", VA = "0x182D7BF00", 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: 0x06000B06 RID: 2822 RVA: 0x00009B40 File Offset: 0x00007D40
[Token(Token = "0x6000B06")]
[Address(RVA = "0x69AEA0", Offset = "0x699EA0", VA = "0x18069AEA0", 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: 0x06000B07 RID: 2823 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6000B07")]
[Address(RVA = "0x2D7BCA0", Offset = "0x2D7ACA0", VA = "0x182D7BCA0", Slot = "9")]
public virtual void NextBytes(byte[] buffer)
{
}
// Token: 0x04000480 RID: 1152
[Token(Token = "0x4000480")]
private const int MBIG = 2147483647;
// Token: 0x04000481 RID: 1153
[Token(Token = "0x4000481")]
private const int MSEED = 161803398;
// Token: 0x04000482 RID: 1154
[Token(Token = "0x4000482")]
private const int MZ = 0;
// Token: 0x04000483 RID: 1155
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x4000483")]
private int inext;
// Token: 0x04000484 RID: 1156
[global::Cpp2IlInjected.FieldOffset(Offset = "0x14")]
[Token(Token = "0x4000484")]
private int inextp;
// Token: 0x04000485 RID: 1157
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x4000485")]
private int[] SeedArray;
}
}