Click or drag to resize
Accord.NET (logo)

ToolsIsPowerOf2 Method

Checks if the specified integer is power of 2.

Namespace:  Accord.Math
Assembly:  Accord.Math (in Accord.Math.dll) Version: 3.8.0
Syntax
public static bool IsPowerOf2(
	int x
)
Request Example View Source

Parameters

x
Type: SystemInt32
Integer number to check.

Return Value

Type: Boolean
Returns true if the specified number is power of 2. Otherwise returns false.
See Also