Table of Contents

Class RandomSystem

Namespace
Framework.Common.Random
Assembly
Assembly-CSharp.dll

Seed 기반 재현 가능한 전역 랜덤 관리. DI Singleton.

public class RandomSystem
Inheritance
object
RandomSystem

Remarks

로컬 독립 랜덤 시퀀스가 필요하면 SeededRandom(struct, Common) 사용. SetSeed 호출 후 동일 Seed → 동일 결과 시퀀스가 재현된다.

Constructors

RandomSystem()

public RandomSystem()

Methods

Next(int, int)

public int Next(int min, int max)

Parameters

min int
max int

Returns

int

NextFloat(float, float)

public float NextFloat(float min = 0, float max = 1)

Parameters

min float
max float

Returns

float

Pick<T>(IList<T>)

public T Pick<T>(IList<T> list)

Parameters

list IList<T>

Returns

T

Type Parameters

T

SetSeed(int)

Seed 설정. 동일 Seed → 동일 시퀀스 재현.

public void SetSeed(int seed)

Parameters

seed int