zig
zig copied to clipboard
docs: Update doc comments for `std.math.isPowerOfTwo`
Because I think the current doc comments for std.math.isPowerOfTwo is insufficient to explain how it works.
what is this adding over the name of the function?
This function returns whether the given value is an integral power of two. This pull request adds documentation explaining this behavior. The current documentation makes it difficult to understand what this function does, since it only states that it asserts given_value > 0. We can guess what this function does from the function name and examples, but I think it would be easier to understand if there is proper documentation.