The number for which to find the next power of two.
The next power of two for the given number.
nextPowerOfTwo(6); // Returns 8
nextPowerOfTwo(15); // Returns 16
Method used to find the next power of two for a given bigint.
The bigint for which to find the next power of two.
The next power of two for the given bigint.
nextPowerOfTwo(6n); // Returns 8n
nextPowerOfTwo(15n); // Returns 16n
Generated using TypeDoc
Method used to find the next power of two for a given number.