Zig NEWS

Discussion on: How to use the random number generator in Zig

Collapse
 
falconerd profile image
Dylan Falconer

You can use the builtin @mod

const num = @mod(rand_impl.random().int(i32), 32);
Enter fullscreen mode Exit fullscreen mode