Fix MIN macro

This commit is contained in:
Luca Marchesano 2018-11-20 21:52:30 +01:00 committed by GitHub
parent 0e8ca35453
commit 57f5462d0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -87,8 +87,8 @@ typedef unsigned int uint;
////////////////////////////////////////////////////////////////////////////////////////
// macros
#define MIN(a,b) ((size_t)(a) < (size_t)(b))?(a):(b)
#define MAX(a,b) ((size_t)(a) > (size_t)(b))?(a):(b)
#define MIN(a,b) ((float)(a) < (float)(b))?(a):(b)
#define MAX(a,b) ((a) > (b))?(a):(b)
#define MAKEWORD(low, high) ((uint16)(((uint8)(low)) | (((uint16)((uint8)(high))) << 8)))
#define MAKEDWORD(low, high) ((uint32)(((uint16)(low)) | (((uint32)((uint16)(high))) << 16)))
#define LOBYTE(w) ((uint8)(uint16)(w & 0x00FF))