Click or drag to resize

BinaryMathNextPowerOfTwoGreaterOrEqualThan(UInt64) 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 ulong NextPowerOfTwoGreaterOrEqualThan(
	ulong x
)

Parameters

x  UInt64
The argument to test.

Return Value

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