Expand description
Utils for working with bits
Functions§
- ceil
- Returns the ceil of
value/divisor - get_bit
- Returns whether bit at position
iindatais set or not - get_
bit_ ⚠raw - Returns whether bit at position
iindatais set or not. - round_
upto_ multiple_ of_ 64 - Returns the nearest number that is
>=thannumand is a multiple of 64 - round_
upto_ power_ of_ 2 - Returns the nearest multiple of
factorthat is>=thannum. Herefactormust be a power of 2. - set_bit
- Sets bit at position
ifordatato 1 - set_
bit_ ⚠raw - Sets bit at position
ifordata - unset_
bit - Sets bit at position
ifordatato 0 - unset_
bit_ ⚠raw - Sets bit at position
ifordatato 0