Click or drag to resize

BinaryMathNextPowerOfTwoGreaterOrEqualThan(Int32) Method

Return x if x is is a power of two, else return the smallest number >x, which is a power of two.

Namespace: Altaxo.Calc
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static int NextPowerOfTwoGreaterOrEqualThan(
	int x
)

Parameters

x  Int32
The argument to test.

Return Value

Int32
The argument, if it is a power of two. Else the next greater number which is a power of two.
See Also