Browse Source

engine: mathlib: added Q_equal macros

pull/2/head
SNMetamorph 3 years ago committed by Alibek Omarov #SupportRMS
parent
commit
af3c0686c5
  1. 1
      public/xash3d_mathlib.h

1
public/xash3d_mathlib.h

@ -73,6 +73,7 @@ GNU General Public License for more details. @@ -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))

Loading…
Cancel
Save