C# Класс Microsoft.Automata.Chooser

Random number chooser.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Choose ( int n ) : int

Initializes a new instance of the Chooser class.

Gets or sets the random seed of the chooser. The value of this property is ignored. The property is needed for backward compatibility.

Returns a nonnegative random number less than the specified maximum.

ChooseBV32 ( ) : uint

Choose a random uint.

ChooseBV64 ( ) : ulong

Choose a random ulong.

ChooseDouble ( ) : double

Returns a random number between 0.0 and 1.0.

ChooseTrueOrFalse ( ) : bool

Choose true or false randomly.

Chooser ( ) : System

Initializes a new instance of the Chooser class.

Приватные методы

Метод Описание
GetMostSignificantBit ( uint n ) : uint

Calculates the value of the most significant bit in a positive integer.

Описание методов

Choose() публичный Метод

Initializes a new instance of the Chooser class. Gets or sets the random seed of the chooser. The value of this property is ignored. The property is needed for backward compatibility. Returns a nonnegative random number less than the specified maximum.
public Choose ( int n ) : int
n int The exclusive upper bound of the random number to be generated. n must be /// greater than or equal to zero.
Результат int

ChooseBV32() публичный Метод

Choose a random uint.
public ChooseBV32 ( ) : uint
Результат uint

ChooseBV64() публичный Метод

Choose a random ulong.
public ChooseBV64 ( ) : ulong
Результат ulong

ChooseDouble() публичный Метод

Returns a random number between 0.0 and 1.0.
public ChooseDouble ( ) : double
Результат double

ChooseTrueOrFalse() публичный Метод

Choose true or false randomly.
public ChooseTrueOrFalse ( ) : bool
Результат bool

Chooser() публичный Метод

Initializes a new instance of the Chooser class.
public Chooser ( ) : System
Результат System