From 5a64ffea650059e333af5a38fa01e0b0d33060a3 Mon Sep 17 00:00:00 2001 From: Irlan <-> Date: Fri, 18 May 2018 02:03:00 -0300 Subject: [PATCH] separate inf and nan checks --- include/bounce/common/math/math.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/bounce/common/math/math.h b/include/bounce/common/math/math.h index d65d08c..4bbc091 100644 --- a/include/bounce/common/math/math.h +++ b/include/bounce/common/math/math.h @@ -23,6 +23,16 @@ #include // For abs() with integral types #include +inline bool b3IsInf(float32 x) +{ + return std::isinf(x); +} + +inline bool b3IsNaN(float32 x) +{ + return std::isnan(x); +} + inline bool b3IsValid(float32 fx) { i32 ix = *(i32*)(&fx);