Click or drag to resize
DigitalRuneMathHelperNextPowerOf2 Method
Returns the smallest power of two that is greater than the given value.

Namespace: DigitalRune.Mathematics
Assembly: DigitalRune.Mathematics (in DigitalRune.Mathematics.dll) Version: 1.14.0.0 (1.14.0.14427)
Syntax
[CLSCompliantAttribute(false)]
public static uint NextPowerOf2(
	uint value
)

Parameters

value
Type: SystemUInt32
The value.

Return Value

Type: UInt32
The smallest power of two (2x) that is greater than value.
Remarks
For example, NextPowerOf2(7) is 8 and NextPowerOf2(8) is 16.
See Also