| author | |
| committer | |
| log | 3f6eef22e4f50c1fb80557f7e48e85d8224b6281 |
| tree | 38e4fce6e39ca10be2c8129359f5ec1f11bcce8e |
| parent | df167af0b626479613732389d91e2b7d13f03dc6 |
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 { |
| 53 | 53 | return values[index]; |
| 54 | 54 | } |
| 55 | 55 | |
| 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)`. | |
| 57 | 57 | /// `i` is evenly distributed. |
| 58 | 58 | pub fn int(r: *Random, comptime T: type) T { |
| 59 | 59 | const bits = @typeInfo(T).Int.bits; |