mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-19 13:54:23 +01:00
More efficient dtostrf() emulation on ARM
This commit is contained in:
parent
81d41fc761
commit
a2e7413d22
@ -20,11 +20,8 @@
|
||||
|
||||
char *dtostrf (double val, signed char width, unsigned char prec, char *sout) {
|
||||
char fmt[20];
|
||||
if (width<0) {
|
||||
sprintf(fmt, "%%-%d.%df", width, prec);
|
||||
} else {
|
||||
sprintf(fmt, "%%%d.%df", width, prec);
|
||||
}
|
||||
sprintf(fmt, "%%%d.%df", width, prec);
|
||||
sprintf(sout, fmt, val);
|
||||
return sout;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user