private static GetBits ( uint source, int first, int length, int shift ) : byte | ||
source | uint | |
first | int | |
length | int | |
shift | int | |
Результат | byte |
private static byte GetBits(uint source, int first, int length, int shift)
{
uint[] bitmasks = { 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff };
uint bitmask = bitmasks[length];
source = source >> first;
source = source & bitmask;
source = source << shift;
return (byte)source;
}
ESTexture2D::GetBits ( int width, int length, int height, |