Skip to main content

bar

Function bar 

Source
pub fn bar(probability: f64, width: usize) -> String
Expand description

A horizontal bar width cells wide showing probability.

Sub-cell resolution matters here: a choice between twenty options routinely puts one percent on a loser, and rounding that to an empty bar would show “impossible” where the model actually said “unlikely”. Eighth-blocks keep the distinction at any sane width.