示例#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
文件: read.cs 项目: 0xCM/arrows
 public static Bit readbit(double src, int pos)
 => BitMask.test(src, pos);
示例#3
0
文件: read.cs 项目: 0xCM/arrows
 public static Bit readbit(float src, int pos)
 => BitMask.test(src, pos);
示例#4
0
文件: read.cs 项目: 0xCM/arrows
 public static Bit readbit(ulong src, int pos)
 => BitMask.test(src, pos);
示例#5
0
文件: read.cs 项目: 0xCM/arrows
 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
文件: Byte256.cs 项目: 0xCM/arrows
 char MakeBitChar(sbyte src, int pos)
 => BitMask.test(src, pos) ? '1' : '0';