C# Class Microsoft.Automata.Chooser

Random number chooser.
Afficher le fichier Open project: AutomataDotNet/Automata Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
GetMostSignificantBit ( uint n ) : uint

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

Method Details

Choose() public méthode

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.
Résultat int

ChooseBV32() public méthode

Choose a random uint.
public ChooseBV32 ( ) : uint
Résultat uint

ChooseBV64() public méthode

Choose a random ulong.
public ChooseBV64 ( ) : ulong
Résultat ulong

ChooseDouble() public méthode

Returns a random number between 0.0 and 1.0.
public ChooseDouble ( ) : double
Résultat double

ChooseTrueOrFalse() public méthode

Choose true or false randomly.
public ChooseTrueOrFalse ( ) : bool
Résultat bool

Chooser() public méthode

Initializes a new instance of the Chooser class.
public Chooser ( ) : System
Résultat System