Click or drag to resize
Accord.NET (logo)

ToolsPreviousPowerOf2 Method

Returns the previous power of 2 after the input value x.

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

Parameters

x
Type: SystemInt32
Input value x.

Return Value

Type: Int32
Returns the previous power of 2 after the input value x.
See Also