1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-29 10:24:12 +01:00

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

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)