Esempio n. 1
0
        private readonly uint GetIndex(uint x, uint y)
        {
            var offset = y * Stride + x;

            Contract.AssertLess(offset, Data.Length.Unsigned());

            return(offset);
        }
Esempio n. 2
0
 public static byte ExtractByte(this ulong value, int offset)
 {
     Contract.AssertLess(Math.Abs(offset), sizeof(ulong) * 8);
     return(unchecked ((byte)((value >> offset) & 0xFFU)));
 }