diff --git a/inc/hgl/TypeFunc.h b/inc/hgl/TypeFunc.h index 7ba258f..58aee02 100644 --- a/inc/hgl/TypeFunc.h +++ b/inc/hgl/TypeFunc.h @@ -143,6 +143,24 @@ namespace hgl return count; } + template + inline constexpr int GetBitOffset(const T value) + { + int offset=0; + T bit=1; + + for(int i=0;i