Mirror Engine
V5
How To
Mirror Engine Logo

Mirror Engine API


Mirror Engine API / math / powerOfTwo

Function: powerOfTwo()

function powerOfTwo(x: number): boolean

Returns true if argument is a power-of-two and false otherwise.

Parameters

x

number

Number to check for power-of-two property.

Returns

boolean

true if power-of-two and false otherwise.

Mirror Engine Logo