From 3f6eef22e4f50c1fb80557f7e48e85d8224b6281 Mon Sep 17 00:00:00 2001 From: ominitay <37453713+ominitay@users.noreply.github.com> Date: Sun, 24 Oct 2021 21:29:37 +0100 Subject: [PATCH] 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. --- lib/std/rand.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;