aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNerdyPepper <[email protected]>2019-04-27 18:03:10 +0100
committerNerdyPepper <[email protected]>2019-04-27 18:03:10 +0100
commit2eda7d259dc7529ddaf52c30558d1e0432217959 (patch)
tree8eba28eb794730b7f4f6c52dacd2ac8f5fd521a6
parentd5ad5b4346ed7a9b12aa1a854e3245f0ceaa93b4 (diff)
bugfix: precision ignored for other bases
-rw-r--r--src/format/mod.rs2
1 files changed, 1 insertions, 1 deletions
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<String, CalcError> {
55 fract *= obase as f64; 55 fract *= obase as f64;
56 obase_fract.push(table[fract.trunc() as usize]); 56 obase_fract.push(table[fract.trunc() as usize]);
57 i += 1; 57 i += 1;
58 if fract.fract() == 0. || i > 10 { 58 if fract.fract() == 0. || i >= CONFIGURATION.fix {
59 break; 59 break;
60 } 60 }
61 fract = fract.fract(); 61 fract = fract.fract();