moved a bunch of files

This commit is contained in:
Olivier Gagnon
2021-09-25 14:42:57 -04:00
parent 07bc697477
commit 06f716c0fa
174 changed files with 236 additions and 236 deletions
+17
View File
@@ -0,0 +1,17 @@
/**
* Determines if the number is a power of 2
* @param n The number to check.
*/
export function isPowerOfTwo(n: number): boolean {
if (isNaN(n)) {
return false;
}
if (n === 0) {
return false;
}
// Disabiling the bitwise rule because it's honestly the most effecient way to check for this.
// tslint:disable-next-line:no-bitwise
return (n & (n - 1)) === 0;
}