mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-23 01:32:55 +02:00
[refactor] Moved 'powerOfTwo' to 'isPowerOfTwo' TS file
This commit is contained in:
@@ -110,17 +110,10 @@ function compareArrays(a1, a2) {
|
||||
return true;
|
||||
}
|
||||
|
||||
//Returns bool indicating whether or not its a power of 2
|
||||
function powerOfTwo(n) {
|
||||
if (isNaN(n)) {return false;}
|
||||
return n && (n & (n-1)) === 0;
|
||||
}
|
||||
|
||||
export {sizeOfObject,
|
||||
clearObject,
|
||||
clearEventListeners,
|
||||
compareArrays,
|
||||
powerOfTwo,
|
||||
clearEventListenersEl,
|
||||
removeElement,
|
||||
createAccordionElement,
|
||||
|
||||
Reference in New Issue
Block a user