Skip to content

Commit

Permalink
Print "inf" for infinite floating point numbers (using isinf()).
Browse files Browse the repository at this point in the history
  • Loading branch information
damellis committed Jun 23, 2012
1 parent 34b265e commit 71a615c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hardware/arduino/cores/arduino/Print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 71a615c

Please sign in to comment.