From af3c0686c5d96874b3ad33cb0a00f43f79894868 Mon Sep 17 00:00:00 2001 From: SNMetamorph <25657591+SNMetamorph@users.noreply.github.com> Date: Thu, 8 Jul 2021 19:54:12 +0400 Subject: [PATCH] engine: mathlib: added Q_equal macros --- public/xash3d_mathlib.h | 1 + 1 file changed, 1 insertion(+) diff --git a/public/xash3d_mathlib.h b/public/xash3d_mathlib.h index 45bed2ee..4e37788b 100644 --- a/public/xash3d_mathlib.h +++ b/public/xash3d_mathlib.h @@ -73,6 +73,7 @@ GNU General Public License for more details. #define Q_min( a, b ) (((a) < (b)) ? (a) : (b)) #define Q_max( a, b ) (((a) > (b)) ? (a) : (b)) +#define Q_equal( a, b ) (((a) > ((b) - EQUAL_EPSILON)) && ((a) < ((b) + EQUAL_EPSILON))) #define Q_recip( a ) ((float)(1.0f / (float)(a))) #define Q_floor( a ) ((float)(int)(a)) #define Q_ceil( a ) ((float)(int)((a) + 1))