8 #ifndef BOTAN_ROUNDING_H__
9 #define BOTAN_ROUNDING_H__
11 #include <botan/types.h>
12 #include <botan/assert.h>
22 inline size_t round_up(
size_t n,
size_t align_to)
27 n += align_to - (n % align_to);
43 return (n - (n % align_to));
49 inline size_t clamp(
size_t n,
size_t lower_bound,
size_t upper_bound)
T round_down(T n, T align_to)
size_t clamp(size_t n, size_t lower_bound, size_t upper_bound)
#define BOTAN_ASSERT(expr, assertion_made)
size_t round_up(size_t n, size_t align_to)