mirror of https://github.com/noisymime/Arduino.git
Print "inf" for infinite floating point numbers (using isinf()).
http://code.google.com/p/arduino/issues/detail?id=961
This commit is contained in:
parent
34b265ed4c
commit
71a615c65d
|
@ -227,6 +227,7 @@ size_t Print::printFloat(double number, uint8_t digits)
|
|||
size_t n = 0;
|
||||
|
||||
if (isnan(number)) return print("nan");
|
||||
if (isinf(number)) return print("inf");
|
||||
|
||||
// Handle negative numbers
|
||||
if (number < 0.0)
|
||||
|
|
Loading…
Reference in New Issue