fix (utils): fixed ceil_to bug, when inserting calculations instead of numbers

This commit is contained in:
antifallobst 2023-03-04 23:45:41 +01:00
parent 819da41bb1
commit fc148378f7
1 changed files with 4 additions and 4 deletions

View File

@ -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;