Method IsPowerOf2
IsPowerOf2(int)
Checks if the number is a power of two.
Declaration
public static bool IsPowerOf2(int num)
Parameters
Type | Name | Description |
---|---|---|
int | num | Positive number. |
Returns
Type | Description |
---|---|
bool | True if num is a power of 2. |
IsPowerOf2(uint)
Checks if the number is a power of two.
Declaration
public static bool IsPowerOf2(uint num)
Parameters
Type | Name | Description |
---|---|---|
uint | num | Positive number. |
Returns
Type | Description |
---|---|
bool | True if num is a power of 2. |