Hi, This library is very useful and thank you for that. I have faced an issue printing negative f32 values. the following code prints out 0.00 instead of -0.22.
let y = ufmt_float::uFmt_f32::Two(-0.22);
ufmt::uwriteln!(&mut serial, "y: {}\r", y ).void_unwrap();
Adhoc solution:
let mut y = -0.22;
let mut y_sym = "";
if y < 0.0 {
y_sym = "-";
y = y * -1.0;
}
let y = ufmt_float::uFmt_f32::Two(y);
ufmt::uwriteln!(&mut serial, "y: {}{}\r", y_sym, y ).void_unwrap();
Hi, This library is very useful and thank you for that. I have faced an issue printing negative f32 values. the following code prints out
0.00instead of-0.22.Adhoc solution: