mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-22 01:45:19 +01:00
engine: mathlib: added Q_equal macros
This commit is contained in:
parent
8b76ab93fb
commit
af3c0686c5
@ -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…
Reference in New Issue
Block a user