Checks if the specified integer is power of 2.

Namespace:  AForge.Math
Assembly:  AForge.Math (in AForge.Math.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public static bool IsPowerOf2(
	int x
)

Parameters

x
Type: System..::.Int32
Integer number to check.

Return Value

Returns true if the specified number is power of 2. Otherwise returns false.

See Also