aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKonstantin Shaposhnikov <k.shaposhnikov@gmail.com>2016-05-26 09:45:57 +0800
committerIan Lance Taylor <iant@golang.org>2016-06-26 05:00:39 +0000
commit33fa855e6cfa906e12c624663b1010862bf4df6f (patch)
treef0f95539741d06aa6c38abfcb083281a60aea8d1 /src
parent4fcb4eb27986e5fa7d26aeb85b04909e03d11ff9 (diff)
downloadgo-33fa855e6cfa906e12c624663b1010862bf4df6f.tar.xz
math/rand: fix comment about bits of seed used by the default Source
Fixes #15788 Change-Id: I5a1fd1e5992f1c16cf8d8437d742bf02e1653b9c Reviewed-on: https://go-review.googlesource.com/23461 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src')
-rw-r--r--src/math/rand/rand.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/math/rand/rand.go b/src/math/rand/rand.go
index add039ed4b..05a56e0f04 100644
--- a/src/math/rand/rand.go
+++ b/src/math/rand/rand.go
@@ -179,8 +179,8 @@ var globalRand = New(&lockedSource{src: NewSource(1)})
// Seed uses the provided seed value to initialize the default Source to a
// deterministic state. If Seed is not called, the generator behaves as
-// if seeded by Seed(1). Only uses the bottom 31 bits of seed; the top 33
-// bits are ignored.
+// if seeded by Seed(1). Seed values that have the same remainder when
+// divided by 2^31-1 generate the same pseudo-random sequence.
func Seed(seed int64) { globalRand.Seed(seed) }
// Int63 returns a non-negative pseudo-random 63-bit integer as an int64