Closed dmadison closed 3 years ago
What's the issue here? Can you provide an example?
This PR was poorly titled. It's actually about adding the relevant 0 padding after the decimal when the value is 0.
Minimal example:
matrix.printFloat(0.00, 2);
matrix.writeDisplay();
delay(1000);
matrix.printFloat(0.12345, 2);
matrix.writeDisplay();
delay(1000);
With the latest release of the library (0dd1ed9) this sets the display to:
0
0.12
With this change, the display is instead set to:
0.00
0.12
This respects the "fractional digit" setting and looks better when working with a range of floats that includes zero.
Thanks. That helps explain it. Tested this and looks good.
Always prints the fractional digit(s) for a floating point number, if specified (>0).