mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 06:45:24 +00:00
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:
parent
df167af0b6
commit
3f6eef22e4
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user