Skip to content

A library that makes fiddling with bits easy as calling a function.

Notifications You must be signed in to change notification settings

burner/BitFiddle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BitFiddle

alt text

Bit fiddle functions set set and test bits in integer

Functions

Bit Testing Functions

bool testBit(T)(const T bitfield, const ulong idx) if(isIntegral!T);

bool testAnyBit(T)(const T bitfield) if(isIntegral!T);

bool testNoBit(T)(const T bitfield) if(isIntegral!T);

bool testAllBit(T)(const T bitfield) if(isIntegral!T);

Bit Setting Functions

T setBit(T)(const T bitfield, const ulong idx) if(isIntegral!T);

T setBit(T)(const T bitfield, const ulong idx, bool value) if(isIntegral!T);

T flipBit(T)(const T bitfield, const ulong idx) if(isIntegral!T);

T resetBit(T)(const T bitfield, const ulong idx) if(isIntegral!T);

About

A library that makes fiddling with bits easy as calling a function.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages