1
0
mirror of https://github.com/golang/go synced 2024-11-24 23:47:55 -07:00

math/big: Correcting typo in SetBit() documentation

z is set to x+bit change, not z+bit change

R=golang-dev
CC=golang-dev
https://golang.org/cl/5374056
This commit is contained in:
David G. Andersen 2011-11-10 14:41:24 -05:00 committed by Russ Cox
parent e9e874b7fc
commit 120f3b7b9d

View 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.