mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-17 22:23:10 +03: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:
@ -227,6 +227,7 @@ size_t Print::printFloat(double number, uint8_t digits)
|
|||||||
size_t n = 0;
|
size_t n = 0;
|
||||||
|
|
||||||
if (isnan(number)) return print("nan");
|
if (isnan(number)) return print("nan");
|
||||||
|
if (isinf(number)) return print("inf");
|
||||||
|
|
||||||
// Handle negative numbers
|
// Handle negative numbers
|
||||||
if (number < 0.0)
|
if (number < 0.0)
|
||||||
|
Reference in New Issue
Block a user