util-math: Rename get_power_of_two to get_power_of_two_exponent

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2018-09-29 16:57:41 +02:00
parent 9a8a44045b
commit 6561ea9b3c

View file

@ -120,13 +120,13 @@ namespace util {
#pragma pop_macro("is_power_of_two_as_loop")
template<typename T>
inline uint64_t get_power_of_two_floor(T v)
inline uint64_t get_power_of_two_exponent_floor(T v)
{
return uint64_t(floor(log10(T(v)) / log10(2.0)));
}
template<typename T>
inline uint64_t get_power_of_two_ceil(T v)
inline uint64_t get_power_of_two_exponent_ceil(T v)
{
return uint64_t(ceil(log10(T(v)) / log10(2.0)));
}