EASEA defined functions
Révision datée du 15 juin 2011 à 16:30 par Kruger (discussion | contributions) (→Random Number Generators)
Random Number Generators
TossCoin
Description
Simulates the toss of a coin. There are two different definitions of the tossCoin function:
- A simple toss of a coin.
- A biased toss of a coin.
EASEA syntax
bool tossCoin() // SImple tosscoin
bool tossCoin(float bias) // Biased tossCoin
Example
if( tossCoin(0.1)){ ... }
Random
Description
Generates a random number. There are several definitions to the random function:
- Random function with Min Max Boundary
- Random function with Max Boundary only
In the case of a Max boundary only, the Min boundary will be 0.
EASEA syntax
int random( int Min, int Max)
int random( int Max)
float random( float Min, float Max)
double random( double Min, double Max)