MCPcopy Create free account
hub / github.com/LabSound/LabSound / RoundNextPow2

Function RoundNextPow2

include/LabSound/extended/Util.h:44–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42
43template <typename T>
44inline T RoundNextPow2(T v)
45{
46 v--;
47 v |= v >> 1;
48 v |= v >> 2;
49 v |= v >> 4;
50 v |= v >> 8;
51 v |= v >> 16;
52 v++;
53 return v;
54}
55
56template <typename S, typename T>
57inline T clampTo(S value, T a, T b)

Callers 3

RealtimeAnalyserMethod · 0.85
setFftSizeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected