/// <summary>
 /// The LowestBitId.
 /// </summary>
 /// <param name="i">The i<see cref="int"/>.</param>
 /// <returns>The <see cref="uint"/>.</returns>
 public static uint LowestBitId(this int i)
 {
     return(Bitscan.ForwardIndex32((uint)i));
 }
 /// <summary>
 /// The CountTrailingZeros.
 /// </summary>
 /// <param name="i">The i<see cref="int"/>.</param>
 /// <returns>The <see cref="uint"/>.</returns>
 public static uint CountTrailingZeros(this int i)
 {
     return(Bitscan.LengthBefore32((uint)i));
 }
 /// <summary>
 /// The HighestBitId.
 /// </summary>
 /// <param name="i">The i<see cref="int"/>.</param>
 /// <returns>The <see cref="uint"/>.</returns>
 public static uint HighestBitId(this int i)
 {
     return(Bitscan.ReverseIndex32((uint)i));
 }
 /// <summary>
 /// The CountLeadingZeros.
 /// </summary>
 /// <param name="i">The i<see cref="int"/>.</param>
 /// <returns>The <see cref="uint"/>.</returns>
 public static uint CountLeadingZeros(this int i)
 {
     return(Bitscan.LengthAfter32((uint)i));
 }
Esempio n. 5
0
 public static uint CountLeadingZeros(this long i)
 {
     return(Bitscan.LengthAfter64((ulong)i));
 }
Esempio n. 6
0
 public static uint CountTrailingZeros(this long i)
 {
     return(Bitscan.LengthBefore64((ulong)i));
 }
Esempio n. 7
0
 public static uint LowestBitId(this long i)
 {
     return(Bitscan.ForwardIndex64((ulong)i));
 }
Esempio n. 8
0
 public static uint HighestBitId(this long i)
 {
     return(Bitscan.ReverseIndex64((ulong)i));
 }