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); }
public static Bit readbit(double src, int pos) => BitMask.test(src, pos);
public static Bit readbit(float src, int pos) => BitMask.test(src, pos);
public static Bit readbit(ulong src, int pos) => BitMask.test(src, pos);
public static Bit readbit(ushort src, int pos) => BitMask.test(src, pos);
public static bool TestBit(this long src, byte pos) => BitMask.test(src, pos);
public static bool TestBit(this ushort src, byte pos) => BitMask.test(src, pos);
public static ref double ToggleBit(this ref double src, int pos) { BitMask.toggle(ref src, pos); return(ref src); }
public static ref float ToggleBit(this ref float src, int pos) { BitMask.toggle(ref src, pos); return(ref src); }
public static ref ulong ToggleBit(this ref ulong src, int pos) { BitMask.toggle(ref src, pos); return(ref src); }
char MakeBitChar(sbyte src, int pos) => BitMask.test(src, pos) ? '1' : '0';