mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
parent
dac2c1c514
commit
18effc3f9e
@ -49,7 +49,7 @@ long atol(const char* s)
|
|||||||
double atof(const char* s)
|
double atof(const char* s)
|
||||||
{
|
{
|
||||||
double result = 0;
|
double result = 0;
|
||||||
double sign = 1;
|
double factor = 1.0;
|
||||||
|
|
||||||
while (*s == ' ' || *s == '\t' || *s == '\r' || *s == '\n')
|
while (*s == ' ' || *s == '\t' || *s == '\r' || *s == '\n')
|
||||||
++s;
|
++s;
|
||||||
@ -59,7 +59,7 @@ double atof(const char* s)
|
|||||||
|
|
||||||
if (*s == '-')
|
if (*s == '-')
|
||||||
{
|
{
|
||||||
sign = -1;
|
factor = -1.0;
|
||||||
++s;
|
++s;
|
||||||
}
|
}
|
||||||
if (*s == '+')
|
if (*s == '+')
|
||||||
@ -68,7 +68,6 @@ double atof(const char* s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool decimals = false;
|
bool decimals = false;
|
||||||
double factor = 1.0;
|
|
||||||
char c;
|
char c;
|
||||||
while((c = *s))
|
while((c = *s))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user