Crosscompiling solution for isfinite & isnan

This commit is contained in:
Yehonal 2016-08-17 10:00:46 +02:00
parent 97cbf9adf6
commit a6d4db8910

View file

@ -137,13 +137,11 @@
#endif #endif
using namespace std;
inline float finiteAlways(float f) { return isfinite(f) ? f : 0.0f; } inline float finiteAlways(float f) { return isfinite(f) ? f : 0.0f; }
#if COMPILER == COMPILER_MICROSOFT inline bool myisfinite(float f) { return isfinite(f) && !isnan(f); }
inline bool myisfinite(float f) { return _finite(f) && !_isnan(f); }
#else
inline bool myisfinite(float f) { return isfinite(f) && !std::isnan(f); }
#endif
#define atol(a) strtoul( a, NULL, 10) #define atol(a) strtoul( a, NULL, 10)