nextPow2HigherOrEqual

Computes next power of 2.

  1. int nextPow2HigherOrEqual(int i)
    pure nothrow @nogc
    int
    nextPow2HigherOrEqual
    (
    int i
    )
  2. long nextPow2HigherOrEqual(long i)

Return Value

Type: int

N so that N is a power of 2 and N >= i. Note: This function is not equivalent to the builtin std.math.nextPow2 when the input is a power of 2.

Meta