Commit 3f6eef22e4

ominitay <37453713+ominitay@users.noreply.github.com>
2021-10-24 22:29:37
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 parent df167af
Changed files (1)
lib
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;