diff options
| author | Robert Griesemer <gri@golang.org> | 2017-02-24 16:50:48 -0800 |
|---|---|---|
| committer | Robert Griesemer <gri@golang.org> | 2017-02-25 00:58:25 +0000 |
| commit | ac91a514ff521999b142901ad9714ca3f47f01a0 (patch) | |
| tree | 60e63bafea6e7982853c91a56c7c8f2bb48ee17f /src/math/bits | |
| parent | 4b3e6fe123d95f461d8f9febfe782a138ba2387c (diff) | |
| download | go-ac91a514ff521999b142901ad9714ca3f47f01a0.tar.xz | |
math/bits: fix incorrect doc strings for TrailingZeros functions
Change-Id: I3e40018ab1903d3b9ada7ad7812ba71ea2a428e7
Reviewed-on: https://go-review.googlesource.com/37456
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/math/bits')
| -rw-r--r-- | src/math/bits/bits.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/math/bits/bits.go b/src/math/bits/bits.go index 97186adc94..4038e9bf01 100644 --- a/src/math/bits/bits.go +++ b/src/math/bits/bits.go @@ -28,19 +28,19 @@ func LeadingZeros64(x uint64) int { return 64 - blen(uint64(x)) } // --- TrailingZeros --- -// TrailingZeros returns the number of trailing zero bits in x; the result is 0 for x == 0. +// TrailingZeros returns the number of trailing zero bits in x; the result is UintSize for x == 0. func TrailingZeros(x uint) int { return ntz(x) } -// TrailingZeros8 returns the number of trailing zero bits in x; the result is 0 for x == 0. +// TrailingZeros8 returns the number of trailing zero bits in x; the result is 8 for x == 0. func TrailingZeros8(x uint8) int { return ntz8(x) } -// TrailingZeros16 returns the number of trailing zero bits in x; the result is 0 for x == 0. +// TrailingZeros16 returns the number of trailing zero bits in x; the result is 16 for x == 0. func TrailingZeros16(x uint16) int { return ntz16(x) } -// TrailingZeros32 returns the number of trailing zero bits in x; the result is 0 for x == 0. +// TrailingZeros32 returns the number of trailing zero bits in x; the result is 32 for x == 0. func TrailingZeros32(x uint32) int { return ntz32(x) } -// TrailingZeros64 returns the number of trailing zero bits in x; the result is 0 for x == 0. +// TrailingZeros64 returns the number of trailing zero bits in x; the result is 64 for x == 0. func TrailingZeros64(x uint64) int { return ntz64(x) } // --- OnesCount --- |
