mirror of
https://github.com/jakcron/nstool.git
synced 2024-12-22 18:55:29 +00:00
[fnd] Added MIN(x,y), MAX(x,y) macros.
This commit is contained in:
parent
544d484690
commit
64035225d8
|
@ -17,6 +17,9 @@ typedef uint8_t u8;
|
||||||
|
|
||||||
#define BIT(n) (1ULL << (n))
|
#define BIT(n) (1ULL << (n))
|
||||||
|
|
||||||
|
#define MIN(x,y) ((x) <= (y)? (x) : (y))
|
||||||
|
#define MAX(x,y) ((x) >= (y)? (x) : (y))
|
||||||
|
|
||||||
static inline uint16_t __local_bswap16(uint16_t x) {
|
static inline uint16_t __local_bswap16(uint16_t x) {
|
||||||
return ((x << 8) & 0xff00) | ((x >> 8) & 0x00ff);
|
return ((x << 8) & 0xff00) | ((x >> 8) & 0x00ff);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue