diff options
Diffstat (limited to 'source/q_shared.h')
-rw-r--r-- | source/q_shared.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/q_shared.h b/source/q_shared.h index 9a4bf6f..d3f1765 100644 --- a/source/q_shared.h +++ b/source/q_shared.h @@ -311,8 +311,9 @@ void RotatePointAroundVector( vec3_t dst, const vec3_t dir, const vec3_t point, int DirToByte( const vec3_t dir ); void ByteToDir( int index, vec3_t dir ); -#define clamp(a,b,c) ((b)>=(c)?(a)=(b):(a)<(b)?(a)=(b):(a)>(c)?(a)=(c):(a)) - +#define clamp(a,b,c) ((a)<(b)?(a)=(b):(a)>(c)?(a)=(c):(a)) +#define cclamp(a,b,c) ((b)>(c)?clamp(a,c,b):clamp(a,b,c)) + #ifndef max #define max(a,b) ((a)>(b)?(a):(b)) #endif |