MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / ratio

Function ratio

atomic-cli/src/commands/git/rolling_dashboard.rs:150–156  ·  view source on GitHub ↗
(value: usize, total: usize)

Source from the content-addressed store, hash-verified

148}
149
150fn ratio(value: usize, total: usize) -> f64 {
151 if total == 0 {
152 0.0
153 } else {
154 (value as f64 / total as f64).clamp(0.0, 1.0)
155 }
156}
157
158fn panel(title: &str) -> Block<'_> {
159 Block::bordered()

Callers 1

drawFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected