Skip to content

math.MathUtils.Function.getNextPowerOf2

Christian d'Heureuse edited this page Jun 6, 2026 · 2 revisions

dsp-collection / math/MathUtils / getNextPowerOf2

Function: getNextPowerOf2()

function getNextPowerOf2(x): number;

Returns the lowest power of 2 that is higher than x.

Parameters

x

number

Returns

number

Clone this wiki locally