mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-10 22:05:06 +00:00
util-math: Rename get_power_of_two to get_power_of_two_exponent
This commit is contained in:
parent
9a8a44045b
commit
6561ea9b3c
1 changed files with 2 additions and 2 deletions
|
@ -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)));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue