Пример #1
0
        long IPointSource <long> .Next()
        {
            var next     = (long)Points.Next(Int64.MaxValue);
            var negative = BitMask.test(next, 7);
            var result   = BitMask.test(next, 7) ? BitMask.enable(ref next, 63) : next;

            return(result);
        }
Пример #2
0
 public static Bit readbit(double src, int pos)
 => BitMask.test(src, pos);
Пример #3
0
 public static Bit readbit(float src, int pos)
 => BitMask.test(src, pos);
Пример #4
0
 public static Bit readbit(ulong src, int pos)
 => BitMask.test(src, pos);
Пример #5
0
 public static Bit readbit(ushort src, int pos)
 => BitMask.test(src, pos);
Пример #6
0
 public static bool TestBit(this long src, byte pos)
 => BitMask.test(src, pos);
Пример #7
0
 public static bool TestBit(this ushort src, byte pos)
 => BitMask.test(src, pos);
Пример #8
0
 public static ref double ToggleBit(this ref double src, int pos)
 {
     BitMask.toggle(ref src, pos);
     return(ref src);
 }
Пример #9
0
 public static ref float ToggleBit(this ref float src, int pos)
 {
     BitMask.toggle(ref src, pos);
     return(ref src);
 }
Пример #10
0
 public static ref ulong ToggleBit(this ref ulong src, int pos)
 {
     BitMask.toggle(ref src, pos);
     return(ref src);
 }
Пример #11
0
 char MakeBitChar(sbyte src, int pos)
 => BitMask.test(src, pos) ? '1' : '0';