CyrusBuilt.MonoPi.BitSet.NumberOfTrailingZeros C# (CSharp) Method

NumberOfTrailingZeros() private static method

Gets the number of trailing zeros in the specified long.
private static NumberOfTrailingZeros ( long n ) : Int32
n long /// The long value to inspect. ///
return System.Int32
		private static Int32 NumberOfTrailingZeros(long n) {
			Int32 mask = 1;
			Int32 result = 64;
			for (Int32 i = 0; i < 64; i++, mask <<= 1) {
				if ((n & mask) != 0) {
					result = i;
					break;
				}
			}
			return result;
		}
		#endregion