Axiom.Media.Bitwise.IsPow2 C# (CSharp) Method

IsPow2() public static method

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