Fix isfinite erroring

This commit is contained in:
Garrett Brown
2020-08-16 20:57:20 -04:00
parent b074ae8f4c
commit be5ad1f445
+2 -2
View File
@@ -24,12 +24,12 @@
#define B2_MATH_H #define B2_MATH_H
#include "b2_settings.h" #include "b2_settings.h"
#include <math.h> #include <cmath>
/// This function is used to ensure that a floating point number is not a NaN or infinity. /// This function is used to ensure that a floating point number is not a NaN or infinity.
inline bool b2IsValid(float x) inline bool b2IsValid(float x)
{ {
return isfinite(x); return std::isfinite(x);
} }
#define b2Sqrt(x) sqrtf(x) #define b2Sqrt(x) sqrtf(x)