fastrand
fastrand copied to clipboard
Custom range for floats
Currently, floats only generate in a range of 0..1
It's pretty easy to convert it in the user side to a specific range, but is there a reason why there isn't a way to do this directly? Since this would be a breaking change, maybe add a fastrand::f64_range(range).
The current one has the same behavior as rand's random
.
However, I don't think there is any reason why {f32,f64}_range
is not available, so I would accept a PR to add {f32,f64}_range
.
This is now exposed in fastrand-contrib
v0.1.0.