MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / RoundDown

Function RoundDown

Bcore/src/main/cpp/base/bit_utils.h:164–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162
163template<typename T>
164constexpr T RoundDown(T x, typename Identity<T>::type n) {
165 DCHECK(IsPowerOfTwo(n));
166 return (x & -n);
167}
168
169template<typename T>
170constexpr T RoundUp(T x, typename std::remove_reference<T>::type n) WARN_UNUSED;

Callers 2

RoundUpFunction · 0.85
AlignDownFunction · 0.85

Calls 1

IsPowerOfTwoFunction · 0.85

Tested by

no test coverage detected