mirror of
https://github.com/golang/go
synced 2024-11-18 18:04:46 -07:00
math/big: simplify bool expression
Change-Id: I280c53be455f2fe0474ad577c0f7b7908a4eccb2 Reviewed-on: https://go-review.googlesource.com/36993 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
72aa757ddd
commit
6910756f9b
@ -570,7 +570,7 @@ func (z *Int) binaryGCD(a, b *Int) *Int {
|
|||||||
// Rand sets z to a pseudo-random number in [0, n) and returns z.
|
// Rand sets z to a pseudo-random number in [0, n) and returns z.
|
||||||
func (z *Int) Rand(rnd *rand.Rand, n *Int) *Int {
|
func (z *Int) Rand(rnd *rand.Rand, n *Int) *Int {
|
||||||
z.neg = false
|
z.neg = false
|
||||||
if n.neg == true || len(n.abs) == 0 {
|
if n.neg || len(n.abs) == 0 {
|
||||||
z.abs = nil
|
z.abs = nil
|
||||||
return z
|
return z
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user