| ... | @@ -53,7 +53,7 @@ pub const Random = struct { | ... | @@ -53,7 +53,7 @@ pub const Random = struct { |
| 53 | return values[index]; | 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 | /// `i` is evenly distributed. | 57 | /// `i` is evenly distributed. |
| 58 | pub fn int(r: *Random, comptime T: type) T { | 58 | pub fn int(r: *Random, comptime T: type) T { |
| 59 | const bits = @typeInfo(T).Int.bits; | 59 | const bits = @typeInfo(T).Int.bits; |