EASEA defined functions

De
Aller à la navigation Aller à la recherche

Random Number Generators

TossCoin

Description

Simulated the toss of a coin. There are two different definitions of the tossCoin function:

  1. A simple toss of a coin.
  2. A biased toss of a coin.

EASEA syntax

bool tossCoin()                // SImple tosscoin
bool tossCoin(float bias)  // Biased tossCoin

Example

if( tossCoin(0.1)){
    ...
}

Random