Print "inf" for infinite floating point numbers (using isinf()).

http://code.google.com/p/arduino/issues/detail?id=961
This commit is contained in:
David A. Mellis 2012-06-23 10:37:35 -05:00
parent 34b265ed4c
commit 71a615c65d
1 changed files with 1 additions and 0 deletions

View File

@ -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)