nextPow2HigherOrEqual

Computes next power of 2.

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

Return Value

Type: long

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