randomTrue

Generates true with the given probability p. Is equivalent to uniform() < p. The probability of false is 1 - p correspondingly. 

randomTrue(double p)

Parameters

Name Type Description
p double the probability of true.

Result

Type Description
boolean true with probablity p, false with probability 1 - p.