mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-26 20:54:22 +01:00
Merge pull request #4667 from bblanchon/patch-1
Speed and size improvement in Print::printFloat()
This commit is contained in:
commit
87643f93d5
@ -257,7 +257,7 @@ size_t Print::printFloat(double number, uint8_t digits)
|
|||||||
while (digits-- > 0)
|
while (digits-- > 0)
|
||||||
{
|
{
|
||||||
remainder *= 10.0;
|
remainder *= 10.0;
|
||||||
int toPrint = int(remainder);
|
unsigned toPrint = unsigned(remainder);
|
||||||
n += print(toPrint);
|
n += print(toPrint);
|
||||||
remainder -= toPrint;
|
remainder -= toPrint;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user