private readonly uint GetIndex(uint x, uint y) { var offset = y * Stride + x; Contract.AssertLess(offset, Data.Length.Unsigned()); return(offset); }
public static byte ExtractByte(this ulong value, int offset) { Contract.AssertLess(Math.Abs(offset), sizeof(ulong) * 8); return(unchecked ((byte)((value >> offset) & 0xFFU))); }