fix (utils): fixed ceil_to bug, when inserting calculations instead of numbers
This commit is contained in:
parent
819da41bb1
commit
fc148378f7
|
@ -27,10 +27,10 @@
|
||||||
#include "stdtypes.h"
|
#include "stdtypes.h"
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
|
|
||||||
#define MAX(a, b) (a > b ? a : b)
|
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||||
#define MIN(a, b) (a > b ? b : a)
|
#define MIN(a, b) ((a) > (b) ? (b) : (a))
|
||||||
#define CEIL_TO(a, b) (a % b ? a + b - (a % b) : a)
|
#define CEIL_TO(a, b) ((a) % (b) ? (a) + (b) - ((a) % (b)) : (a))
|
||||||
#define FLOOR_TO(a, b) (a - (a % b))
|
#define FLOOR_TO(a, b) ((a) - ((a) % (b)))
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint64_t x;
|
uint64_t x;
|
||||||
|
|
Loading…
Reference in New Issue