Compare commits

...

2 Commits

Author SHA1 Message Date
Elfein Landers e224c5422a undo debug statement 2022-03-14 04:18:18 -07:00
Elfein Landers 29856381e5 logic fix 2022-03-14 04:17:39 -07:00
1 changed files with 6 additions and 5 deletions

View File

@ -20,9 +20,15 @@ fn hex_float(h: f64) -> String {
h *= 16.0;
e += 1;
}
let mut h = h as usize;
let mut output = String::new();
if e == 0 {
output.push('0');
output.push('.');
}
let mut num_divides = 0;
while h > 0 {
output.push(match h % 16 {
@ -51,11 +57,6 @@ fn hex_float(h: f64) -> String {
}
}
if e == 0 {
output.push('.');
output.push('0');
}
if neg {
output.push('-');
}