[vtk-developers] Adding IsNan() to vtkMath

Moreland, Kenneth kmorel at sandia.gov
Thu Jul 16 12:45:24 EDT 2009


I noticed that vtkMath has some preprocessor macros to support isnan:

#ifndef isnan
// This is compiler specific not platform specific: MinGW doesn't need that.
# if defined(_MSC_VER) || defined(__BORLANDC__)
#  include <float.h>
#  define isnan(x) _isnan(x)
# endif
#endif

I would like to use that to create an IsNan static method for vtkMath:

int vtkMath::IsNan(double x)
{
  return isnan(x);
}

Does anyone know any portability issues with this?

-Ken

   ****      Kenneth Moreland
    ***      Sandia National Laboratories
***********
*** *** ***  email: kmorel at sandia.gov
**  ***  **  phone: (505) 844-8919
    ***      web:   http://www.cs.unm.edu/~kmorel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20090716/6707b086/attachment.html>


More information about the vtk-developers mailing list