aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorominitay <37453713+ominitay@users.noreply.github.com>2021-10-24 21:29:37 +0100
committerAndrew Kelley <andrew@ziglang.org>2021-10-25 13:34:28 -0400
commit3f6eef22e4f50c1fb80557f7e48e85d8224b6281 (patch)
tree38e4fce6e39ca10be2c8129359f5ec1f11bcce8e /lib
parentdf167af0b626479613732389d91e2b7d13f03dc6 (diff)
downloadzig-3f6eef22e4f50c1fb80557f7e48e85d8224b6281.tar.gz
zig-3f6eef22e4f50c1fb80557f7e48e85d8224b6281.zip
Fix documentation for Random.int
Documentation incorrectly stated that Random.int 'Returns a random int `i` such that `0 <= i <= maxInt(T)`.' This commit amends this.
Diffstat (limited to 'lib')
-rw-r--r--lib/std/rand.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/rand.zig b/lib/std/rand.zig
index 77fab7094d..bafc324b91 100644
--- a/lib/std/rand.zig
+++ b/lib/std/rand.zig
@@ -53,7 +53,7 @@ pub const Random = struct {
return values[index];
}
- /// Returns a random int `i` such that `0 <= i <= maxInt(T)`.
+ /// Returns a random int `i` such that `minInt(T) <= i <= maxInt(T)`.
/// `i` is evenly distributed.
pub fn int(r: *Random, comptime T: type) T {
const bits = @typeInfo(T).Int.bits;