]> Cypherpunks repositories - gostls13.git/commitdiff
math/big: Correcting typo in SetBit() documentation
authorDavid G. Andersen <dave.andersen@gmail.com>
Thu, 10 Nov 2011 19:41:24 +0000 (14:41 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 10 Nov 2011 19:41:24 +0000 (14:41 -0500)
z is set to x+bit change, not z+bit change

R=golang-dev
CC=golang-dev
https://golang.org/cl/5374056

src/pkg/math/big/int.go

index 533a97f7495012ff6a147695d19b02c25fa2cd61..2558be580500bdf474bc47167584894428a692b1 100644 (file)
@@ -685,7 +685,7 @@ func (z *Int) Bit(i int) uint {
        return z.abs.bit(uint(i))
 }
 
-// SetBit sets the i'th bit of z to bit and returns z.
+// SetBit sets z to x, with x's i'th bit set to b (0 or 1).
 // That is, if bit is 1 SetBit sets z = x | (1 << i);
 // if bit is 0 it sets z = x &^ (1 << i). If bit is not 0 or 1,
 // SetBit will panic.