Uniform value on a grid of step within [lo, hi] (e.g. whole-dp steps of 100 for dp × 100 values).
step
[lo, hi]
int sampleStep(Rng rng, int step) => lo + step * rng.nextInt((hi - lo) ~/ step + 1);