How To

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.