From 2eda7d259dc7529ddaf52c30558d1e0432217959 Mon Sep 17 00:00:00 2001 From: NerdyPepper Date: Sat, 27 Apr 2019 22:33:10 +0530 Subject: bugfix: precision ignored for other bases --- src/format/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/format/mod.rs b/src/format/mod.rs index 4ac5612..210b0cb 100644 --- a/src/format/mod.rs +++ b/src/format/mod.rs @@ -55,7 +55,7 @@ fn radix_fmt(number: f64, obase: usize) -> Result { fract *= obase as f64; obase_fract.push(table[fract.trunc() as usize]); i += 1; - if fract.fract() == 0. || i > 10 { + if fract.fract() == 0. || i >= CONFIGURATION.fix { break; } fract = fract.fract(); -- cgit v1.2.3