Add UC_ROUND_DOWN, fix duplicated UC_ROUND_UP
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user