folpindo / arduino

Automatically exported from code.google.com/p/arduino
0 stars 0 forks source link

Add more readable name for isnan() from math.h #812

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
There are some useful functions in math.h, especially isnan(). We should add a 
few defines to give them more beginner-readable names.

Original issue reported on code.google.com by tom.i...@gmail.com on 10 Feb 2012 at 6:03

GoogleCodeExporter commented 9 years ago
Seems reasonable.  What do you use isnan() for?  What would you rather it be 
called?

Original comment by dmel...@gmail.com on 13 Feb 2012 at 12:19

GoogleCodeExporter commented 9 years ago
I'm currently using it in an adaptation of an example from Limor on a humidity 
sensor, but it'd be good for checking the result of a string to see if it's a 
number.  The good thing about it, as opposed to the current isDigit, is that it 
checks for floats and multi-digit integers. Very handy.

Probably should look through math.h and see what else is useful but terse.

t.

Original comment by tom.i...@gmail.com on 13 Feb 2012 at 3:49