maths: rename divup to align
This commit is contained in:
parent
fcd40105a7
commit
9fc979ee1d
@ -43,7 +43,7 @@ rootsquare (T a, T b) pure;
|
||||
|
||||
template <typename T, typename U>
|
||||
typename std::common_type<T, U>::type
|
||||
round_up (T value, U align) pure;
|
||||
align (T value, U size) pure;
|
||||
|
||||
|
||||
template <typename T>
|
||||
|
@ -28,9 +28,9 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
template <typename T, typename U>
|
||||
typename std::common_type<T,U>::type
|
||||
round_up (T value, U align) {
|
||||
static_assert (std::is_integral<T>::value, "round_up requires integral types");
|
||||
static_assert (std::is_integral<U>::value, "round_up requires integral types");
|
||||
align (T value, U size) {
|
||||
static_assert (std::is_integral<T>::value, "align requires integral types");
|
||||
static_assert (std::is_integral<U>::value, "align requires integral types");
|
||||
|
||||
return divup (value, align) * align;
|
||||
return divup (value, size) * size;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user