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.
This commit is contained in:
ominitay 2021-10-24 21:29:37 +01:00 committed by Andrew Kelley
parent df167af0b6
commit 3f6eef22e4

View File

@ -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;