pub const fn pct_of(cur: f64, max: f64) -> f64
cur as a percentage of max, returning 0.0 when max <= 0.
cur
max
0.0
max <= 0