MCPcopy Create free account
hub / github.com/MyGUI/mygui / firstPO2From

Function firstPO2From

MyGUIEngine/include/MyGUI_Bitwise.h:16–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14 /** Returns the closest power-of-two number greater or equal to value. */
15 template<typename Type>
16 static inline Type firstPO2From(Type _value)
17 {
18 --_value;
19 _value |= _value >> 16;
20 _value |= _value >> 8;
21 _value |= _value >> 4;
22 _value |= _value >> 2;
23 _value |= _value >> 1;
24 ++_value;
25 return _value;
26 }
27
28 /** Determines whether the number is power-of-two or not. */
29 template<typename Type>

Callers 4

checkTextureMethod · 0.85
initialiseFreeTypeMethod · 0.85
createTextureMethod · 0.85
validateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected