Axiom.Media.Bitwise.IsPow2 C# (CSharp) Méthode

IsPow2() public static méthode

checks if a number is a power of 2
public static IsPow2 ( int number ) : bool
number int
Résultat bool
		public static bool IsPow2( int number )
		{
			return ( number & ( number - 1 ) ) == 0;
		}