C# Class Sharpex2D.GameRandom

Datei anzeigen Open project: ThuCommix/Sharpex2D Class Usage Examples

Public Methods

Method Description
GameRandom ( ) : System

Initializes a new GameRandom.

Next ( ) : int

Returns Int32 between Int32 min - and max value.

Next ( int max ) : int

Returns Int32 between 0 and max.

Next ( int min, int max ) : int

Returns Int32 between min and max.

NextBoolean ( ) : bool

Returns true or false.

NextBoolean ( double probability ) : bool

Returns true or false based on the probability.

NextDouble ( ) : double

Returns a double between 0 and 1.

NextFloat ( ) : float

Returns a float between 0 and 1.

Method Details

GameRandom() public method

Initializes a new GameRandom.
public GameRandom ( ) : System
return System

Next() public method

Returns Int32 between Int32 min - and max value.
public Next ( ) : int
return int

Next() public method

Returns Int32 between 0 and max.
public Next ( int max ) : int
max int The Maximum.
return int

Next() public method

Returns Int32 between min and max.
public Next ( int min, int max ) : int
min int The Minimum.
max int The Maximum.
return int

NextBoolean() public method

Returns true or false.
public NextBoolean ( ) : bool
return bool

NextBoolean() public method

Returns true or false based on the probability.
public NextBoolean ( double probability ) : bool
probability double The Probability.
return bool

NextDouble() public method

Returns a double between 0 and 1.
public NextDouble ( ) : double
return double

NextFloat() public method

Returns a float between 0 and 1.
public NextFloat ( ) : float
return float