ceilPowerOfTwo<T extends num> static method

double ceilPowerOfTwo<T extends num>(
  1. T value
)

Implementation

static double ceilPowerOfTwo<T extends num>(T value) {
  return math.pow(2, (math.log(value) / math.ln2).ceil().toDouble()).toDouble();
}