mirror of
https://github.com/azerothcore/azerothcore-wotlk.git
synced 2025-12-06 02:30:26 -08:00
Crosscompiling solution for isfinite & isnan
This commit is contained in:
parent
97cbf9adf6
commit
a6d4db8910
1 changed files with 3 additions and 5 deletions
|
|
@ -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)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue