Generates a random boolean.
The ratio param is used to determine the chance of the boolean being true or false.
ratio
true
false
For instance:
.5
.1
.9
1
0
A random boolean.
The ratio (between 0 and 1) which the boolean is determined to be true or false. The greater the number, the greater the chance of being true.
Generated using TypeDoc
Generates a random boolean.
The
ratioparam is used to determine the chance of the boolean beingtrueorfalse.For instance:
ratiois.5, the chance of beingtrueorfalseis 50%.ratiois.1, the chance of beingtrueis 10%, and of beingfalseis 90%.ratiois.9, the chance of beingtrueis 90%, and of beingfalseis 10%.ratiois1or greater, the chance of beingtrueis 100%.ratiois0or lower, the chance of beingtrueis 0%.Returns
A random boolean.