From 270b2bec6e31a4714cf38e0fa69d7ff2799e2b3d Mon Sep 17 00:00:00 2001 From: paradust7 <102263465+paradust7@users.noreply.github.com> Date: Wed, 21 Feb 2024 13:06:29 -0800 Subject: [PATCH] Ensure that std::abs is used and not integer abs --- include/irrMath.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/irrMath.h b/include/irrMath.h index 0219bd4..0bd0be6 100644 --- a/include/irrMath.h +++ b/include/irrMath.h @@ -5,9 +5,9 @@ #pragma once #include "irrTypes.h" -#include +#include #include -#include // for abs() etc. +#include // for abs() etc. #include // For INT_MAX / UINT_MAX #include @@ -197,7 +197,7 @@ namespace core template ::value, bool> = true> inline bool equals(const T a, const T b, const T tolerance = roundingError()) { - return abs(a - b) <= tolerance; + return std::abs(a - b) <= tolerance; } //! returns if a equals b, taking relative error in form of factor