soir

OVERVIEW

The rnd module provides facilities to introduce randomness in the composition.

FUNCTION

between

between(begin: float, end: float) -> float

Get a random number between two values.

Arguments

Name Type Description
begin The lower bound.
end The upper bound.

one_in

one_in(chance: int) -> bool

Returns True with a chance of 1 in chance.

Arguments

Name Type Description
chance The chance of returning True.