Skip to content
Snippets Groups Projects
Commit 81327832 authored by Cyrille Valladeau's avatar Cyrille Valladeau
Browse files

ENH : change isnan->vcl_math_isnan FIRST MAC COMMIT

parent 6509a155
Branches
Tags
No related merge requests found
...@@ -93,42 +93,15 @@ EuclideanDistanceWithMissingValuePow2< TVector > ...@@ -93,42 +93,15 @@ EuclideanDistanceWithMissingValuePow2< TVector >
return temp * temp ; return temp * temp ;
} }
#if defined(_MSC_VER) /* Microsoft Visual C++ */
#include <float.h>
template< class TVector >
/*static */
bool
EuclideanDistanceWithMissingValuePow2< TVector >
::IsMissingValue ( const ValueType & v)
{
return static_cast<bool>( _isnan( static_cast<double>( v ) ) );
}
#elif HAVE_IEEE_COMPARISONS
template< class TVector > template< class TVector >
/*static */ /*static */
bool bool
EuclideanDistanceWithMissingValuePow2< TVector > EuclideanDistanceWithMissingValuePow2< TVector >
::IsMissingValue ( const ValueType & v) ::IsMissingValue ( const ValueType & v)
{ {
return (v!=v); return static_cast<bool>( vnl_math_isnan( static_cast<double>( v ) ) );
} }
#else
template< class TVector >
/*static */
bool
EuclideanDistanceWithMissingValuePow2< TVector >
::IsMissingValue ( const ValueType & v)
{
return static_cast<bool>( isnan(v) );
}
#endif
template< class TVector > template< class TVector >
/* static */ /* static */
void void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment