Logo
Static Public Member Functions | List of all members
Yukar.Engine.BitwiseOperation Class Reference

A class of bitwise operations More...

Static Public Member Functions

static int SetBit (int setPosition, int bits)
 set a bit More...
 
static int UnsetBit (int unsetPosition, int bits)
 drop the bit More...
 
static bool IsSettingBit (int checkPosition, int bits)
 whether the bit is set More...
 
static int MaskBit (int maskBit, int bit)
 put on a mask More...
 

Detailed Description

A class of bitwise operations

Member Function Documentation

◆ IsSettingBit()

static bool Yukar.Engine.BitwiseOperation.IsSettingBit ( int  checkPosition,
int  bits 
)
static

whether the bit is set

Parameters
checkPosition
bits
Returns

◆ MaskBit()

static int Yukar.Engine.BitwiseOperation.MaskBit ( int  maskBit,
int  bit 
)
static

put on a mask

Parameters
maskBitbits for masks
bitthe bit you want to change
Returns

◆ SetBit()

static int Yukar.Engine.BitwiseOperation.SetBit ( int  setPosition,
int  bits 
)
static

set a bit

Parameters
setPositionstanding position
bitsthe bit you want to change
Returns
bit after change

◆ UnsetBit()

static int Yukar.Engine.BitwiseOperation.UnsetBit ( int  unsetPosition,
int  bits 
)
static

drop the bit

Parameters
unsetPositionposition you want to lower
bitsthe bit you want to change
Returns
bit after change