Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
std.math.isPowerOfTwo: add tests and doc comment and improve assert
The assert is changed from `int != 0` to `int > 0` because negative integers always return `false`. Python's `math.log2` does the same and errors for 0 or negative integers.
- Loading branch information