Add UC_ROUND_DOWN, fix duplicated UC_ROUND_UP

This commit is contained in:
Nils O. Selåsdal
2013-04-08 22:24:19 +02:00
parent 08ea383dd6
commit ad8181cf4d
+2 -2
View File
@@ -107,13 +107,13 @@ if (!(expr) ) {\
#define UC_ROUND_UP(x, y) (((x) / (y)) * (y)) #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 x numerator, must be positive
* @param y denominator * @param y denominator
* @return x rounded to nearest multiple of y * @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 #endif