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

Printing NaN values as "nan" in printFloat().

http://code.google.com/p/arduino/issues/detail?id=946
This commit is contained in:
David A. Mellis 2012-06-04 23:30:41 -04:00
parent a9fedabe3c
commit 308d907694

View File

@ -226,6 +226,8 @@ size_t Print::printFloat(double number, uint8_t digits)
{
size_t n = 0;
if (isnan(number)) return print("nan");
// Handle negative numbers
if (number < 0.0)
{