Skip to content

math.MathUtils.Function.isPowerOf2

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

dsp-collection / math/MathUtils / isPowerOf2

Function: isPowerOf2()

function isPowerOf2(i): boolean;

Defined in: math/MathUtils.ts:29

Returns true if x is a power of 2 between 1 and 2^30.

Parameters

i

number

Returns

boolean

Clone this wiki locally