authorgravatar for 37453713+ominitay@users.noreply.github.comominitay <37453713+ominitay@users.noreply.github.com> 2021-10-24 21:29:37+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-10-25 13:34:28-04:00
log3f6eef22e4f50c1fb80557f7e48e85d8224b6281
tree38e4fce6e39ca10be2c8129359f5ec1f11bcce8e
parentdf167af0b626479613732389d91e2b7d13f03dc6

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.

1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/rand.zig+1-1
......@@ -53,7 +53,7 @@ pub const Random = struct {
5353 return values[index];
5454 }
5555
56 /// Returns a random int `i` such that `0 <= i <= maxInt(T)`.
56 /// Returns a random int `i` such that `minInt(T) <= i <= maxInt(T)`.
5757 /// `i` is evenly distributed.
5858 pub fn int(r: *Random, comptime T: type) T {
5959 const bits = @typeInfo(T).Int.bits;