Method IsPowerOfTwo
IsPowerOfTwo(int)
Returns true if a positive value is a non-zero power of two.
Declaration
public static bool IsPowerOfTwo(int value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | value | A positive value. |
Returns
| Type | Description |
|---|---|
| bool | True if the value is a non-zero, positive power of two. |
Remarks
Result is invalid if value < 0.