C# 클래스 LeopotamGroup.Math.Rng

Rng generator, mersenne twister based.
파일 보기 프로젝트 열기: Leopotam/LeopotamGroupLibraryUnity

공개 메소드들

메소드 설명
GetFloat ( bool includeOne = true ) : float

Get float random number from range [0, 1) or [0, 1] for includeOne=true.

GetFloat ( float min, float max, bool includeMax = true ) : float

Get float random number from range [min, max) or [min, max] for includeMax=true.

GetFloatStatic ( bool includeOne = true ) : float

Get float random number from range [0, 1) or [0, 1] for includeOne=true from singleton rng.

GetFloatStatic ( float min, float max, bool includeMax = true ) : float

Get float random number from range [min, max) or [min, max] for includeMax=true from singleton rng.

GetInt32 ( int max ) : int

Get int32 random number from range [0, max).

GetInt32 ( int min, int max ) : int

Get int32 random number from range [min, max).

GetInt32Static ( int n ) : int

Get int32 random number from range [0, n) from singleton rng.

GetInt32Static ( int min, int max ) : int

Get int32 random number from range [min, max) from singleton rng.

Rng ( ) : UnityEngine

Default initialization.

Rng ( long seed ) : UnityEngine

Initialization with custom seed.

SetSeed ( long seed ) : void

Set new seed.

SetSeedStatic ( long seed ) : void

Set new seed for singleton rng.

비공개 메소드들

메소드 설명
GetRandomUInt32 ( ) : ulong

메소드 상세

GetFloat() 공개 메소드

Get float random number from range [0, 1) or [0, 1] for includeOne=true.
public GetFloat ( bool includeOne = true ) : float
includeOne bool Include 1 value for searching.
리턴 float

GetFloat() 공개 메소드

Get float random number from range [min, max) or [min, max] for includeMax=true.
public GetFloat ( float min, float max, bool includeMax = true ) : float
min float Min value.
max float Max value.
includeMax bool Include max value for searching.
리턴 float

GetFloatStatic() 공개 정적인 메소드

Get float random number from range [0, 1) or [0, 1] for includeOne=true from singleton rng.
public static GetFloatStatic ( bool includeOne = true ) : float
includeOne bool Include 1 value for searching.
리턴 float

GetFloatStatic() 공개 정적인 메소드

Get float random number from range [min, max) or [min, max] for includeMax=true from singleton rng.
public static GetFloatStatic ( float min, float max, bool includeMax = true ) : float
min float Min value.
max float Max value.
includeMax bool Include max value for searching.
리턴 float

GetInt32() 공개 메소드

Get int32 random number from range [0, max).
public GetInt32 ( int max ) : int
max int Max value (excluded).
리턴 int

GetInt32() 공개 메소드

Get int32 random number from range [min, max).
public GetInt32 ( int min, int max ) : int
min int Min value.
max int Max value (excluded).
리턴 int

GetInt32Static() 공개 정적인 메소드

Get int32 random number from range [0, n) from singleton rng.
public static GetInt32Static ( int n ) : int
n int .
리턴 int

GetInt32Static() 공개 정적인 메소드

Get int32 random number from range [min, max) from singleton rng.
public static GetInt32Static ( int min, int max ) : int
min int Min value.
max int Max value (excluded).
리턴 int

Rng() 공개 메소드

Default initialization.
public Rng ( ) : UnityEngine
리턴 UnityEngine

Rng() 공개 메소드

Initialization with custom seed.
public Rng ( long seed ) : UnityEngine
seed long Seed.
리턴 UnityEngine

SetSeed() 공개 메소드

Set new seed.
public SetSeed ( long seed ) : void
seed long Seed.
리턴 void

SetSeedStatic() 공개 정적인 메소드

Set new seed for singleton rng.
public static SetSeedStatic ( long seed ) : void
seed long Seed.
리턴 void