Exemplo n.º 1
0
        public static ulong GetLowestBitValue(ulong flags)
        {
            int lowestBit = LongFlags.GetLowestBitPosition(flags);

            return(lowestBit == 0
                                        ? 0UL
                                        : 1UL << (lowestBit - 1));
        }
Exemplo n.º 2
0
        public static ulong GetHighestBitValue(ulong flags)
        {
            int highestBit = LongFlags.GetHighestBitPosition(flags);

            return(highestBit == 0
                                        ? 0UL
                                        : 1UL << (highestBit - 1));
        }