maths: rename divup to align

This commit is contained in:
Danny Robson 2014-09-01 16:26:01 +10:00
parent fcd40105a7
commit 9fc979ee1d
2 changed files with 5 additions and 5 deletions

View File

@ -43,7 +43,7 @@ rootsquare (T a, T b) pure;
template <typename T, typename U> template <typename T, typename U>
typename std::common_type<T, U>::type typename std::common_type<T, U>::type
round_up (T value, U align) pure; align (T value, U size) pure;
template <typename T> template <typename T>

View File

@ -28,9 +28,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
template <typename T, typename U> template <typename T, typename U>
typename std::common_type<T,U>::type typename std::common_type<T,U>::type
round_up (T value, U align) { align (T value, U size) {
static_assert (std::is_integral<T>::value, "round_up requires integral types"); static_assert (std::is_integral<T>::value, "align requires integral types");
static_assert (std::is_integral<U>::value, "round_up requires integral types"); static_assert (std::is_integral<U>::value, "align requires integral types");
return divup (value, align) * align; return divup (value, size) * size;
} }