Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Booleans

ItemSummary
randomReturns true or false, each with equal chance

Associated Functions

random

fn random() -> bool

Returns true or false, each with equal chance.

let side = if bool::random() "heads" else "tails";