diff --git a/include/ucore/utils.h b/include/ucore/utils.h index f04410b..9adb19f 100644 --- a/include/ucore/utils.h +++ b/include/ucore/utils.h @@ -107,13 +107,13 @@ if (!(expr) ) {\ #define UC_ROUND_UP(x, y) (((x) / (y)) * (y)) /** - * Round x up to nearest multiple of y + * Round x down to nearest multiple of y * * @param x numerator, must be positive * @param y denominator * @return x rounded to nearest multiple of y */ -#define UC_ROUND_UP(x, y) (UC_DIV_ROUND_UP((x),(y)) * (y)) +#define UC_ROUND_DOWN(x, y) ((x) / (y) * (y)) #endif