ceilPowerOfTwo<T extends num> static method

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

Implementation

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