C# 클래스 nv.PriorityQueue.StaticRandom

Thread-safe equivalent of System.Random, using just static methods. If all you want is a source of random numbers, this is an easy class to use. If you need to specify your own seeds (eg for reproducible sequences of numbers), use System.Random.
파일 보기 프로젝트 열기: NGPVAN/nv.PriorityQueue

공개 메소드들

메소드 설명
Next ( ) : int

Returns a nonnegative random number.

Next ( int max ) : int

Returns a nonnegative random number less than the specified maximum.

Next ( int min, int max ) : int

Returns a random number within a specified range.

NextBytes ( byte buffer ) : void

Fills the elements of a specified array of bytes with random numbers.

NextDouble ( ) : double

Returns a random number between 0.0 and 1.0.

메소드 상세

Next() 공개 정적인 메소드

Returns a nonnegative random number.
public static Next ( ) : int
리턴 int

Next() 공개 정적인 메소드

Returns a nonnegative random number less than the specified maximum.
maxValue is less than zero.
public static Next ( int max ) : int
max int
리턴 int

Next() 공개 정적인 메소드

Returns a random number within a specified range.
minValue is greater than maxValue.
public static Next ( int min, int max ) : int
min int The inclusive lower bound of the random number returned.
max int /// The exclusive upper bound of the random number returned. /// maxValue must be greater than or equal to minValue. ///
리턴 int

NextBytes() 공개 정적인 메소드

Fills the elements of a specified array of bytes with random numbers.
buffer is a null reference (Nothing in Visual Basic).
public static NextBytes ( byte buffer ) : void
buffer byte An array of bytes to contain random numbers.
리턴 void

NextDouble() 공개 정적인 메소드

Returns a random number between 0.0 and 1.0.
public static NextDouble ( ) : double
리턴 double